Form mail problem
Prøv af lægge nogle vare i kurven under Bye Amour og Bye Callaway på http://www.lgk.cph.ih.dk/userhp/86Dernæst vælges " Buy Goods " den form der kommer med de vare man har valgt vil jeg gerne have bliver sendt som en mail til undertegnede. Hvordan gør jeg.
Istedet for procees skal den sende :)
koden for siden er således :
<HTML>
<HEAD>
<TITLE>Shopping Buy</TITLE>
</HEAD>
<BODY bgcolor="#000000" text="#FFFFFF" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF">
<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="bfinish.htm" target="_top">');
document.writeln('<TABLE BORDER>');
document.writeln('<TR><TD><b><font size=-1>Item</font></b></TD><TD><b><font size=-1>Quantity</font></b></TD><TD><b><font size=-1>Cost Each</font></b></TD><td><b><font size=-1>Total Cost</font></b></td></TR>');
itemlist = 0;
for (var i = 0; i <= fulllist.length; i++) {
if (fulllist.substring(i,i+1) == '[') {
thisitem = 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.write('<tr><td>'+theitem+'</td>');
document.writeln('<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) == '|') {
if (thisitem==1) theitem = fulllist.substring(itemstart, i);
if (thisitem==2) theprice = fulllist.substring(itemstart, i);
thisitem++;
itemstart=i+1;
}
}
document.writeln('<tr><td colspan=3><b>Total</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>
</SCRIPT>
<center>
<h2>Buy Goods...</h2>
<!-- call showItems to show items in basket -->
<SCRIPT LANGUAGE="JavaScript">
showItems();
</SCRIPT>
<br>
<!-- finish off the form with other details and a /FORM tag -->
<table cols=2>
<tr><td>Email address</td><td><input type=text name="email" size=40></td></tr>
<tr><td>Street</td><td><input type=text name="street" size=40></td></tr>
<tr><td>Town/City</td><td><input type=text name="towncity" size=30></td></tr>
<tr><Td>County</td><td><input type=text name="county" size=30></td></tr>
<tr><td>Postcode</td><td><input type=text name="postcode" size=20></td></tr>
<tr><td>Country</td><td><input type=text name="country" size=20></td></tr>
<tr><td>Telephone</td><td><input type=text name="telephone" size=30></td></tr>
</table>
<br><br>
<input type="submit" value="Proceed">
<input type="reset" value="Reset">
</center>
</form>
</BODY>
</HTML>
