chrisinoz
05-07-2005, 12:06 AM
Hi All
I am trying to get this simple order form to send through a value of eg 25.00 but it keeps sending through .25
Ideas anyone.
Form is here - mockup - just testing functionality
http://www.integrinet.com.au/coffee/ord.php
Screen shot of problem is here.
http://www.integrinet.com.au/coffee/form.php
You will see the demo realtime third party page showing 25.95 - should be 2595. Assume Eway is correct as I have tried other forms and they all work fine for other clients
Here is the short script for it.
Thanks for any help.
Client wants to go live early next week.
Cheers
Chris
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head>
<title>Contact the Coffee Training Centre</title>
<SCRIPT language=JavaScript>
<!--
function CalculateTotals(){
f=document.orderform;
f.total1.value=parseInt(f.qty1.value)*50.00;
f.total2.value=parseInt(f.qty2.value)*295.00;
f.total3.value=parseInt(f.qty3.value)*395.00;
f.total4.value=parseInt(f.qty4.value)*750.00;
f.grandtotal.value=parseInt(f.total1.value)
+parseInt(f.total2.value)
+parseInt(f.total3.value)
+parseInt(f.total4.value);}
//-->
</SCRIPT>
</head>
<FORM name=orderform action=preprocess.php method=post>
<TABLE border=3>
<TBODY>
<TR>
<TH>Qty</TH>
<TH>Part #</TH>
<TH>Description</TH>
<TH>Price</TH>
<TH>Total</TH></TR>
<TR>
<TD>
<select name=qty1 onblur=CalculateTotals()>
<option value=0>0</option>
<option value=1>1</option>
<option value=2>2</option>
</select><!-- <INPUT size=3 name=qty1> --></TD>
<TD>25791</TD>
<TD>Product name</TD>
<TD align=right>$50</TD>
<TD><INPUT
onfocus="document.orderform.qty2.select();
document.orderform.qty2.focus();"
size=7 name=total1></TD></TR>
<TR>
<TD><INPUT onblur=CalculateTotals() size=3 name=qty2></TD>
<TD>17557</TD>
<TD>Product name</TD>
<TD align=right>$295</TD>
<TD><INPUT
onfocus="document.orderform.qty3.select();
document.orderform.qty3.focus();"
size=7 name=total2></TD></TR>
<TR>
<TD><INPUT onblur=CalculateTotals() size=3 name=qty3></TD>
<TD>98754</TD>
<TD>Product name</TD>
<TD align=right>$395</TD>
<TD><INPUT
onfocus="document.orderform.qty4.select();
document.orderform.qty4.focus();"
size=7 name=total3></TD></TR>
<TR>
<TD><INPUT onblur=CalculateTotals() size=3 name=qty4></TD>
<TD>47594</TD>
<TD>Product name</TD>
<TD align=right>$750</TD>
<TD><INPUT
onfocus="document.orderform.qty1.select();
document.orderform.qty1.focus();"
size=7 name=total4></TD></TR>
<TR>
<TD></TD>
<TD></TD>
<TD></TD>
<TD align=right><B>GRAND TOTAL:</B></TD>
<TD><INPUT
onfocus="document.orderform.qty1.select();
document.orderform.qty1.focus();"
size=7 name=grandtotal></TD></TR></TBODY></TABLE><BR>
<SCRIPT language=JavaScript>
<!--
f=document.orderform;
f.qty1.value=0; f.qty2.value=0;
f.qty3.value=0; f.qty4.value=0;
f.total1.value=0; f.total2.value=0;
f.total3.value=0; f.total4.value=0;
f.grandtotal.value=0;
//-->
</SCRIPT>
I am trying to get this simple order form to send through a value of eg 25.00 but it keeps sending through .25
Ideas anyone.
Form is here - mockup - just testing functionality
http://www.integrinet.com.au/coffee/ord.php
Screen shot of problem is here.
http://www.integrinet.com.au/coffee/form.php
You will see the demo realtime third party page showing 25.95 - should be 2595. Assume Eway is correct as I have tried other forms and they all work fine for other clients
Here is the short script for it.
Thanks for any help.
Client wants to go live early next week.
Cheers
Chris
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head>
<title>Contact the Coffee Training Centre</title>
<SCRIPT language=JavaScript>
<!--
function CalculateTotals(){
f=document.orderform;
f.total1.value=parseInt(f.qty1.value)*50.00;
f.total2.value=parseInt(f.qty2.value)*295.00;
f.total3.value=parseInt(f.qty3.value)*395.00;
f.total4.value=parseInt(f.qty4.value)*750.00;
f.grandtotal.value=parseInt(f.total1.value)
+parseInt(f.total2.value)
+parseInt(f.total3.value)
+parseInt(f.total4.value);}
//-->
</SCRIPT>
</head>
<FORM name=orderform action=preprocess.php method=post>
<TABLE border=3>
<TBODY>
<TR>
<TH>Qty</TH>
<TH>Part #</TH>
<TH>Description</TH>
<TH>Price</TH>
<TH>Total</TH></TR>
<TR>
<TD>
<select name=qty1 onblur=CalculateTotals()>
<option value=0>0</option>
<option value=1>1</option>
<option value=2>2</option>
</select><!-- <INPUT size=3 name=qty1> --></TD>
<TD>25791</TD>
<TD>Product name</TD>
<TD align=right>$50</TD>
<TD><INPUT
onfocus="document.orderform.qty2.select();
document.orderform.qty2.focus();"
size=7 name=total1></TD></TR>
<TR>
<TD><INPUT onblur=CalculateTotals() size=3 name=qty2></TD>
<TD>17557</TD>
<TD>Product name</TD>
<TD align=right>$295</TD>
<TD><INPUT
onfocus="document.orderform.qty3.select();
document.orderform.qty3.focus();"
size=7 name=total2></TD></TR>
<TR>
<TD><INPUT onblur=CalculateTotals() size=3 name=qty3></TD>
<TD>98754</TD>
<TD>Product name</TD>
<TD align=right>$395</TD>
<TD><INPUT
onfocus="document.orderform.qty4.select();
document.orderform.qty4.focus();"
size=7 name=total3></TD></TR>
<TR>
<TD><INPUT onblur=CalculateTotals() size=3 name=qty4></TD>
<TD>47594</TD>
<TD>Product name</TD>
<TD align=right>$750</TD>
<TD><INPUT
onfocus="document.orderform.qty1.select();
document.orderform.qty1.focus();"
size=7 name=total4></TD></TR>
<TR>
<TD></TD>
<TD></TD>
<TD></TD>
<TD align=right><B>GRAND TOTAL:</B></TD>
<TD><INPUT
onfocus="document.orderform.qty1.select();
document.orderform.qty1.focus();"
size=7 name=grandtotal></TD></TR></TBODY></TABLE><BR>
<SCRIPT language=JavaScript>
<!--
f=document.orderform;
f.qty1.value=0; f.qty2.value=0;
f.qty3.value=0; f.qty4.value=0;
f.total1.value=0; f.total2.value=0;
f.total3.value=0; f.total4.value=0;
f.grandtotal.value=0;
//-->
</SCRIPT>