A
Andre
I am trying to help a friend with this. He run a booking site for camping
and lodges in Namibia, and if someone lands on the site He/She can select the
camping places and state the amount of days per site etc. These info is then
carried forward in JavaScript to a page containing a FrontPage Form, and
displayed on the top of the page containing the form. Because we can not
figure out how to get that information to be included in the form, He
created a Text Area in the form and then the user can just select all the
info and paste that into the text area and on submit its all send to Him.
Question: Is there a way to have the info included automatically in the
form and cutting out the copy and paste part ?
Here is is final Page:
<HTML>
<div align="center">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="750"
id="table1">
<tr>
<td align="center">
<HEAD>
<TITLE>Persoonlike Besonderhede</TITLE>
</HEAD>
<BODY background="../images/bse.jpg" text="#000078">
<SCRIPT LANGUAGE="JavaScript">
// alterError - fixes a rounding bug in Netscape 2
function alterError(value) {
if (value<=0.99) {
newPounds = '0';
} else {
newPounds = parseInt(value);
}
newPence = parseInt((value+.0008 - newPounds)* 100);
if (eval(newPence) <= 9) newPence='0'+newPence;
newString = newPounds + '.' + newPence;
return (newString);
}
// showItems () - creates a table of items in the basket and
// creates the start of a form which sets information for
// basket items.
function showItems() {
index = document.cookie.indexOf("TheBasket");
countbegin = (document.cookie.indexOf("=", index) + 1);
countend = document.cookie.indexOf(";", index);
if (countend == -1) {
countend = document.cookie.length;
}
fulllist = document.cookie.substring(countbegin, countend);
totprice = 0;
document.writeln('<FORM action="bbuy04.htm" target="_top">');
document.writeln('<TABLE BORDER COLS=4>');
document.writeln('<TR><TD><b>Kampplek</b></TD><TD><b>Nagte</b></TD><TD><b>Per Nag</b></TD><td><b>Totale Koste</b></TR>');
itemlist = 0;
for (var i = 0; i <= fulllist.length; i++) {
if (fulllist.substring(i,i+1) == '[') {
itemstart = i+1;
} else if (fulllist.substring(i,i+1) == ']') {
itemend = i;
thequantity = fulllist.substring(itemstart, itemend);
itemtotal = 0;
itemtotal = (eval(theprice*thequantity));
temptotal = itemtotal * 100;
totprice = totprice + itemtotal;
itemlist=itemlist+1;
document.writeln('<tr><td>'+theitem+'</td><td
align=right>'+thequantity+'</td><td align=right>'+theprice+'</td><td
align=right>'+alterError(itemtotal)+'</td></tr>');
document.writeln('<INPUT TYPE="hidden" NAME="item'+itemlist+'"
VALUE="'+theitem+'" SIZE="40">');
document.writeln('<INPUT TYPE="hidden" NAME="quantity'+itemlist+'"
VALUE="'+thequantity+'" SIZE="40">');
document.writeln('<INPUT TYPE="hidden" NAME="price each'+itemlist+'"
VALUE="'+theprice+'" SIZE="40">');
document.writeln('<INPUT TYPE="hidden" NAME="total cost'+itemlist+'"
VALUE="'+alterError(itemtotal)+'" SIZE="40">');
} else if (fulllist.substring(i,i+1) == ',') {
theitem = fulllist.substring(itemstart, i);
itemstart = i+1;
} else if (fulllist.substring(i,i+1) == '#') {
theprice = fulllist.substring(itemstart, i);
itemstart = i+1;
}
}
document.writeln('<tr><td colspan=3><b>Groot Totaal</b></td><td
align=right>'+alterError(totprice)+'</td></tr>');
document.writeln('<INPUT TYPE="hidden" NAME="Goods Total"
VALUE="'+alterError(totprice)+'" SIZE="40">');
document.writeln('</TABLE>');
}
</SCRIPT>
<center>
<form method="POST" action="../_vti_bin/shtml.dll/viergaste/BBUY04.HTM"
onSubmit="" webbot-action="--WEBBOT-SELF--">
<!--webbot bot="SaveResults" U-File="../_private/form_results.htm"
S-Format="HTML/PRE" S-Label-Fields="TRUE" B-Reverse-Chronology="FALSE"
S-Email-Format="HTML/PRE"
S-Email-Address="(e-mail address removed)" B-Email-Label-Fields="TRUE"
B-Email-Subject-From-Field="FALSE" S-Email-Subject="Bestemming Namibië -
Afrikaanse navraag"
S-Builtin-Fields="REMOTE_NAME REMOTE_USER"
U-Confirmation-Url="BFINISH04.HTM" startspan --><input TYPE="hidden"
NAME="VTI-GROUP" VALUE="0"><!--webbot bot="SaveResults" endspan
i-checksum="43374" -->
<h2><b><font face="Verdana" color="#000078" size="4">U persoonlike
besonderhede ...</font></b></h2>
<!-- call showItems to show items in basket -->
<SCRIPT LANGUAGE="JavaScript">
showItems();
</SCRIPT>
<!-- finish off the form with other details and a /FORM tag -->
<table cols=2 id="table2">
<table cols=2 id="table2">
<tr><td colspan="2">
<p align="center"><font face="Verdana" color="#FF0000">
<b>
<u><font face="Verdana" size="2">
<table cols=2 id="table2">
<tr><td colspan="2">
<p align="center"><font face="Verdana" color="#FF0000">
<b>
<u><font face="Verdana" size="2">
BELANGRIK</font></u><font face="Verdana" size="2">!</font></b></font><font
face="Verdana" color="#FF0000" size="2"> </font><font face="Verdana"
size="2">Tot verder kennisgewing,
<u>gebruik asseblief u aanwyser ("cursor")</u> om<br>
fisies die hele tabel hierbo te kies; druk dan u muis se regterknoppie op
hierdie <br>
keuse en gebruik óf "copy & paste", óf "drag & drop" om dit binne die skadu
<br>
teksarea hieronder te plaas, voordat
u die
persoonlike besonderhede invul, <br>
en die <b>Stuur</b> knoppie <i>kliek</i>. </font><font face="Verdana"
color="#FF0000"><font size="2">
</font><font size="2" color="#FF0000"><br>
</font></font><font face="Verdana" size="2"> <font color="#FF0000">Ons vra
om verskoning
vir hierdie tydelike ongerief</font>.</font><p align="center">
<textarea rows="2" name="Itinerary" cols="60" style="background-color:
#EBE1C3"></textarea></tr>
<tr><td><INPUT TYPE="hidden" NAME="aantal in groep" VALUE="4"
SIZE="10"></td></tr>
<tr><td><font size="2" face="Verdana">Titel</font></td><td><input type=text
name="titel" size=10></td></tr>
<tr><td><font size="2" face="Verdana">Naam</font></td><td><input type=text
name="naam" size=40></td></tr>
<tr><td><font size="2" face="Verdana">E-pos adres</font></td><td><input
type=text name="epos" size=40></td></tr>
<tr><td><font size="2" face="Verdana">Dorp/Stad</font></td><td><input
type=text name="dorp" size=30></td></tr>
<tr><td><font size="2" face="Verdana">Land</font></td><td><input type=text
name="land" size=20></td></tr>
<tr><td><font size="2" face="Verdana">Telefoon</font></td><td><input
type=text name="telefoon" size=30></td></tr>
<tr><td><font size="2" face="Verdana">Beoogde
reisdatums</font></td><td><input type=text name="beoogde_reisdatums"
size=30></td></tr>
<tr><td><font size="2" face="Verdana">Kommentaar of
Vrae</font></td><td><textarea rows="2" name="Kommentaar"
cols="35"></textarea></td></tr>
</table>
<br>
<b>
<font size="2" face="Verdana" color="#FF0000">Moenie vergeet
nie</font></b><font size="2" face="Verdana">,
gebruik die "Kommentaar of Vrae" veld om ons in kennis te <br>
stel indien u meer inligting verlang, vrae beantwoord wil hê, of direkte
opdrag gee <br>
dat ons die besprekingsprosedure moet begin.</font><br>
<br>
<font face="Verdana" color="#800000" size="2"><i>Kliek</i> slegs EENMAAL op
die "Stuur" knoppie, en wag 'n paar sekondes.</font><font face="Verdana"
color="#800000" size="4"><br>
<br>
</font>
<input type="submit" value="Stuur">
<input type="reset" value="Herstel">
</td>
</tr>
</table>
</div>
<table border="0" cellpadding="0" cellspacing="0" width="750" id="table1">
<tr>
<td align="center">
</BODY>
</HTML>
and lodges in Namibia, and if someone lands on the site He/She can select the
camping places and state the amount of days per site etc. These info is then
carried forward in JavaScript to a page containing a FrontPage Form, and
displayed on the top of the page containing the form. Because we can not
figure out how to get that information to be included in the form, He
created a Text Area in the form and then the user can just select all the
info and paste that into the text area and on submit its all send to Him.
Question: Is there a way to have the info included automatically in the
form and cutting out the copy and paste part ?
Here is is final Page:
<HTML>
<div align="center">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="750"
id="table1">
<tr>
<td align="center">
<HEAD>
<TITLE>Persoonlike Besonderhede</TITLE>
</HEAD>
<BODY background="../images/bse.jpg" text="#000078">
<SCRIPT LANGUAGE="JavaScript">
// alterError - fixes a rounding bug in Netscape 2
function alterError(value) {
if (value<=0.99) {
newPounds = '0';
} else {
newPounds = parseInt(value);
}
newPence = parseInt((value+.0008 - newPounds)* 100);
if (eval(newPence) <= 9) newPence='0'+newPence;
newString = newPounds + '.' + newPence;
return (newString);
}
// showItems () - creates a table of items in the basket and
// creates the start of a form which sets information for
// basket items.
function showItems() {
index = document.cookie.indexOf("TheBasket");
countbegin = (document.cookie.indexOf("=", index) + 1);
countend = document.cookie.indexOf(";", index);
if (countend == -1) {
countend = document.cookie.length;
}
fulllist = document.cookie.substring(countbegin, countend);
totprice = 0;
document.writeln('<FORM action="bbuy04.htm" target="_top">');
document.writeln('<TABLE BORDER COLS=4>');
document.writeln('<TR><TD><b>Kampplek</b></TD><TD><b>Nagte</b></TD><TD><b>Per Nag</b></TD><td><b>Totale Koste</b></TR>');
itemlist = 0;
for (var i = 0; i <= fulllist.length; i++) {
if (fulllist.substring(i,i+1) == '[') {
itemstart = i+1;
} else if (fulllist.substring(i,i+1) == ']') {
itemend = i;
thequantity = fulllist.substring(itemstart, itemend);
itemtotal = 0;
itemtotal = (eval(theprice*thequantity));
temptotal = itemtotal * 100;
totprice = totprice + itemtotal;
itemlist=itemlist+1;
document.writeln('<tr><td>'+theitem+'</td><td
align=right>'+thequantity+'</td><td align=right>'+theprice+'</td><td
align=right>'+alterError(itemtotal)+'</td></tr>');
document.writeln('<INPUT TYPE="hidden" NAME="item'+itemlist+'"
VALUE="'+theitem+'" SIZE="40">');
document.writeln('<INPUT TYPE="hidden" NAME="quantity'+itemlist+'"
VALUE="'+thequantity+'" SIZE="40">');
document.writeln('<INPUT TYPE="hidden" NAME="price each'+itemlist+'"
VALUE="'+theprice+'" SIZE="40">');
document.writeln('<INPUT TYPE="hidden" NAME="total cost'+itemlist+'"
VALUE="'+alterError(itemtotal)+'" SIZE="40">');
} else if (fulllist.substring(i,i+1) == ',') {
theitem = fulllist.substring(itemstart, i);
itemstart = i+1;
} else if (fulllist.substring(i,i+1) == '#') {
theprice = fulllist.substring(itemstart, i);
itemstart = i+1;
}
}
document.writeln('<tr><td colspan=3><b>Groot Totaal</b></td><td
align=right>'+alterError(totprice)+'</td></tr>');
document.writeln('<INPUT TYPE="hidden" NAME="Goods Total"
VALUE="'+alterError(totprice)+'" SIZE="40">');
document.writeln('</TABLE>');
}
</SCRIPT>
<center>
<form method="POST" action="../_vti_bin/shtml.dll/viergaste/BBUY04.HTM"
onSubmit="" webbot-action="--WEBBOT-SELF--">
<!--webbot bot="SaveResults" U-File="../_private/form_results.htm"
S-Format="HTML/PRE" S-Label-Fields="TRUE" B-Reverse-Chronology="FALSE"
S-Email-Format="HTML/PRE"
S-Email-Address="(e-mail address removed)" B-Email-Label-Fields="TRUE"
B-Email-Subject-From-Field="FALSE" S-Email-Subject="Bestemming Namibië -
Afrikaanse navraag"
S-Builtin-Fields="REMOTE_NAME REMOTE_USER"
U-Confirmation-Url="BFINISH04.HTM" startspan --><input TYPE="hidden"
NAME="VTI-GROUP" VALUE="0"><!--webbot bot="SaveResults" endspan
i-checksum="43374" -->
<h2><b><font face="Verdana" color="#000078" size="4">U persoonlike
besonderhede ...</font></b></h2>
<!-- call showItems to show items in basket -->
<SCRIPT LANGUAGE="JavaScript">
showItems();
</SCRIPT>
<!-- finish off the form with other details and a /FORM tag -->
<table cols=2 id="table2">
<table cols=2 id="table2">
<tr><td colspan="2">
<p align="center"><font face="Verdana" color="#FF0000">
<b>
<u><font face="Verdana" size="2">
<table cols=2 id="table2">
<tr><td colspan="2">
<p align="center"><font face="Verdana" color="#FF0000">
<b>
<u><font face="Verdana" size="2">
BELANGRIK</font></u><font face="Verdana" size="2">!</font></b></font><font
face="Verdana" color="#FF0000" size="2"> </font><font face="Verdana"
size="2">Tot verder kennisgewing,
<u>gebruik asseblief u aanwyser ("cursor")</u> om<br>
fisies die hele tabel hierbo te kies; druk dan u muis se regterknoppie op
hierdie <br>
keuse en gebruik óf "copy & paste", óf "drag & drop" om dit binne die skadu
<br>
teksarea hieronder te plaas, voordat
u die
persoonlike besonderhede invul, <br>
en die <b>Stuur</b> knoppie <i>kliek</i>. </font><font face="Verdana"
color="#FF0000"><font size="2">
</font><font size="2" color="#FF0000"><br>
</font></font><font face="Verdana" size="2"> <font color="#FF0000">Ons vra
om verskoning
vir hierdie tydelike ongerief</font>.</font><p align="center">
<textarea rows="2" name="Itinerary" cols="60" style="background-color:
#EBE1C3"></textarea></tr>
<tr><td><INPUT TYPE="hidden" NAME="aantal in groep" VALUE="4"
SIZE="10"></td></tr>
<tr><td><font size="2" face="Verdana">Titel</font></td><td><input type=text
name="titel" size=10></td></tr>
<tr><td><font size="2" face="Verdana">Naam</font></td><td><input type=text
name="naam" size=40></td></tr>
<tr><td><font size="2" face="Verdana">E-pos adres</font></td><td><input
type=text name="epos" size=40></td></tr>
<tr><td><font size="2" face="Verdana">Dorp/Stad</font></td><td><input
type=text name="dorp" size=30></td></tr>
<tr><td><font size="2" face="Verdana">Land</font></td><td><input type=text
name="land" size=20></td></tr>
<tr><td><font size="2" face="Verdana">Telefoon</font></td><td><input
type=text name="telefoon" size=30></td></tr>
<tr><td><font size="2" face="Verdana">Beoogde
reisdatums</font></td><td><input type=text name="beoogde_reisdatums"
size=30></td></tr>
<tr><td><font size="2" face="Verdana">Kommentaar of
Vrae</font></td><td><textarea rows="2" name="Kommentaar"
cols="35"></textarea></td></tr>
</table>
<br>
<b>
<font size="2" face="Verdana" color="#FF0000">Moenie vergeet
nie</font></b><font size="2" face="Verdana">,
gebruik die "Kommentaar of Vrae" veld om ons in kennis te <br>
stel indien u meer inligting verlang, vrae beantwoord wil hê, of direkte
opdrag gee <br>
dat ons die besprekingsprosedure moet begin.</font><br>
<br>
<font face="Verdana" color="#800000" size="2"><i>Kliek</i> slegs EENMAAL op
die "Stuur" knoppie, en wag 'n paar sekondes.</font><font face="Verdana"
color="#800000" size="4"><br>
<br>
</font>
<input type="submit" value="Stuur">
<input type="reset" value="Herstel">
</td>
</tr>
</table>
</div>
<table border="0" cellpadding="0" cellspacing="0" width="750" id="table1">
<tr>
<td align="center">
</BODY>
</HTML>