script below won't work when submit click.
Don't know what is the problem, can someone fix this for me?
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML><HEAD><TITLE>Widgets Shopping cart</TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!-- Hide script
function useCCDollars() {
var i=20.00;
percentOfDollars = document.CCDollars.CustomClubsBox.options[document.CCDollars.CustomClubsBox.selectedIndex].value;
// alert(document.CCDollars.CustomClubsBox.options[document.CCDollars.CustomClubsBox.selectedIndex].value);
document.CCDollars.displayBox.value= percentOfDollars=i*percentOfDollars;
var nPrice = eval(document.CCDollars.displayBox.value);
document.CCDollars.newPrice.value = (20 - nPrice);
}
// End script hiding -->
</SCRIPT>
</HEAD><BODY BGCOLOR="DDDDFF">
<FORM NAME="CCDollars">
<TABLE ALIGN="right"><TR><TD><B>I would like to get a discount of</B>
<SELECT NAME="CustomClubsBox">
<OPTION VALUE="0">0%</option>
<OPTION VALUE="0.10">10%</option>
<OPTION VALUE="0.15">15% for 40</option>
<OPTION VALUE="0.20">20% for 50</option>
<OPTION VALUE="0.25">25% for 60</option>
</SELECT>
<B>certificates</B></TD></TR> <TR><TD><B>Which is $</B>
<INPUT TYPE="text" NAME="displayBox" VALUE="0" SIZE=5 MAXLENGTH=5> (savings)</TD></TR> <TR><TD><B>Making my new price</B><BR><B>$</B>
<INPUT TYPE="text" NAME="newPrice" VALUE="20.00" select style="color: #ffffce; background-color:#08007b; font-weight:bold"> </TD></TR> <TR><TD>
<INPUT TYPE="button" NAME="changer" VALUE=">>> click" ONCLICK="useCCDollars()"></TD></TR>
</FORM>
<form action="http://www.shoppingcart.com/sc/cart.cgi" method=POST>
<INPUT TYPE="hidden" name="item" VALUE="1234my account^certificate.^copy sheet^op1^1^^^ea.^^">
<INPUT TYPE="hidden" NAME="sitenum" VALUE="19">
<INPUT TYPE="hidden" NAME="location" VALUE="clubs">
<INPUT TYPE="hidden" NAME="doit" VALUE="doit">
<TR><TD ALIGN="right"><FONT COLOR="0000FF"><B>Return to last Item</B></FONT></TD>
<TD WIDTH="15%">
<INPUT TYPE="submit" NAME="goBack" VALUE="<<<">
</TD></TR>
</FORM>
<FORM METHOD="POST" ENCTYPE="application/x-www-form-urlencoded">
<INPUT TYPE="hidden" NAME="sitenum" VALUE="19">
<INPUT TYPE="hidden" NAME="location" VALUE="clubs">
<INPUT TYPE="hidden" NAME="doit" VALUE="doit"> <INPUT TYPE="hidden" NAME="VC" VALUE=">>>"> <TR><TD ALIGN="right"><FONT COLOR="0000FF"><B>Make This Purchase</B></FONT></TD> <TD WIDTH="15%"><input align=center type=image border=0 name=add
src="bluo-addsm.gif" width=100 height=34></TD></TR>
</FORM>
</TABLE>
</body>
</html>
Don't know what is the problem, can someone fix this for me?
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML><HEAD><TITLE>Widgets Shopping cart</TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!-- Hide script
function useCCDollars() {
var i=20.00;
percentOfDollars = document.CCDollars.CustomClubsBox.options[document.CCDollars.CustomClubsBox.selectedIndex].value;
// alert(document.CCDollars.CustomClubsBox.options[document.CCDollars.CustomClubsBox.selectedIndex].value);
document.CCDollars.displayBox.value= percentOfDollars=i*percentOfDollars;
var nPrice = eval(document.CCDollars.displayBox.value);
document.CCDollars.newPrice.value = (20 - nPrice);
}
// End script hiding -->
</SCRIPT>
</HEAD><BODY BGCOLOR="DDDDFF">
<FORM NAME="CCDollars">
<TABLE ALIGN="right"><TR><TD><B>I would like to get a discount of</B>
<SELECT NAME="CustomClubsBox">
<OPTION VALUE="0">0%</option>
<OPTION VALUE="0.10">10%</option>
<OPTION VALUE="0.15">15% for 40</option>
<OPTION VALUE="0.20">20% for 50</option>
<OPTION VALUE="0.25">25% for 60</option>
</SELECT>
<B>certificates</B></TD></TR> <TR><TD><B>Which is $</B>
<INPUT TYPE="text" NAME="displayBox" VALUE="0" SIZE=5 MAXLENGTH=5> (savings)</TD></TR> <TR><TD><B>Making my new price</B><BR><B>$</B>
<INPUT TYPE="text" NAME="newPrice" VALUE="20.00" select style="color: #ffffce; background-color:#08007b; font-weight:bold"> </TD></TR> <TR><TD>
<INPUT TYPE="button" NAME="changer" VALUE=">>> click" ONCLICK="useCCDollars()"></TD></TR>
</FORM>
<form action="http://www.shoppingcart.com/sc/cart.cgi" method=POST>
<INPUT TYPE="hidden" name="item" VALUE="1234my account^certificate.^copy sheet^op1^1^^^ea.^^">
<INPUT TYPE="hidden" NAME="sitenum" VALUE="19">
<INPUT TYPE="hidden" NAME="location" VALUE="clubs">
<INPUT TYPE="hidden" NAME="doit" VALUE="doit">
<TR><TD ALIGN="right"><FONT COLOR="0000FF"><B>Return to last Item</B></FONT></TD>
<TD WIDTH="15%">
<INPUT TYPE="submit" NAME="goBack" VALUE="<<<">
</TD></TR>
</FORM>
<FORM METHOD="POST" ENCTYPE="application/x-www-form-urlencoded">
<INPUT TYPE="hidden" NAME="sitenum" VALUE="19">
<INPUT TYPE="hidden" NAME="location" VALUE="clubs">
<INPUT TYPE="hidden" NAME="doit" VALUE="doit"> <INPUT TYPE="hidden" NAME="VC" VALUE=">>>"> <TR><TD ALIGN="right"><FONT COLOR="0000FF"><B>Make This Purchase</B></FONT></TD> <TD WIDTH="15%"><input align=center type=image border=0 name=add
src="bluo-addsm.gif" width=100 height=34></TD></TR>
</FORM>
</TABLE>
</body>
</html>
Comment