order form

admin

Administrator
Staff member
I am trying to construct
a order form using java script to calculate the totals when customers
submit their information.I was using the Sams JavaScript in 24 HRS
manual.I constructed my order form from the one in the book it didn't
work.AI also found a javascript programming language on this web site it
didn't work either.Here is the prgram that I used,can you look at it and
let me know, what I'am doing wrong.<HTML><HEAD><TITLE>YO!WILLIE
RECORDS</TITLE>

<Script language="JavaScript">
<!--
function calculateTotals(){
f=document.orderform;
f.total1.value=parseFloat(f.checkbox1.value)*50.00;
f.total2.value=parseFloat(f.checkbox2.value)*13.99;
f.total3.value=parseFloat(f.checkbox3.value)*13.99;
f.total4.value=parseFloat(f.checkbox4.value)*49.99;
f.grandtotal.value=parseFloat(f.total1.value)
+parseFloat(f.total2.value)
+parseFloat(f.total3.value)
+parseFloat(f.total4.value);}
//-->
</script>
</head><a
href="breakopening.html"><center><b>HOME</b></center></a></td><td><a
href="breakopening.html"><b></b></a></td></tr><TD>
</tbody></table>
<TABLE align=left border=30 height=30 width=30 table>

<TBODY>
<TR>
<TBODY>
<TR>
<TD><B>BREAKBEAT LP's <P><a href=http://www.webdeveloper.com/forum/archive/index.php/"breaka-z.html">A-Z</A></p>

<b>Book</p>
<a href="books1.html">A-Z</A></U>
</B></B></TD></TR></TBODY></TABLE>



</B></B></TD></TR></TBODY></TABLE>
<P></P>
<body>


<h1>Order Form</h1>
<p>Please indicate which record that you want to order in the
"CHECKBOX".The total amount of your order will be calculated
automatically.When you are ready to submit your order.
click on the <b>Make Purchase</b> button.</p>
<form name="orderform" method="post" action="C:\Documents and
Settings\WILLIE\My Documents\yowillie\breaka-f.html"><A
HREF=mailto:[email protected]>E-mail me</A>

<pre>What is your name <input text="text"
id="fullname" size=50/>
What is your address <input text="text" id="address" size="50"/>
City<INPUT TEXT="text" id="city" size="25"/> State <input text="text"
id="state" size="25"/> Zip Code<input text="text" id="zip code"
size="25"/>
Your e-mail address<input type="text"
id="e-address"size="50"/>
</prep></p>
<table border="3"><tr>
<th>Checkbox</th><th>Title</th><th>Artist</th>
<th>Price</th><th>Total</th></tr>
<tr><td>
<input type="Checkbox" id="obo" size="3" OnBlur="calculateTotals()"
/></td>
<td><center>Kukurudu</center></td><td><center>Obo Addy</center></td>
<td align="right">$50.00</td>
<td><input name="total1"size="7"
OnFocus="document.orderform.checkbox1.select();
document.orderform.checkbox1.focus();"/></td></tr>
 
Back
Top