Largins421
Programmer
Hello,
I have been programming for a long time (since 1968), web programming is quite new to me, and I am baffled by an issue I am having which involves an HTML Form and a Java script handler. The form is for a shopping cart, and was working fine until I needed to add some radio buttons to specify the desired finish for a particular product. The code for the working form (different product) follows:
<FORM NAME=order ACTION="managecart.html" onSubmit="AddToCart(this);">
Quantity: <input type=text size=2 maxlength=3 name=QUANTITY
onChange='this.value=CKquantity(this.value)' value="1"><BR><BR>
<input type="image" src="./images/buynow.gif"
border=0 value="Add to Cart" align=top>
<input type=hidden name=PRICE value="2.95">
<input type=hidden name=NAME value="M802 Baseball Glitter Sport Medal">
<input type=hidden name=ID_NUM value="M802">
<input type=hidden name=SHIPPING value=".795">
</FORM>
Please note the value ID_NUM, this is what I want the radio button to populate. The non-working code follows:
<FORM NAME=order ACTION="managecart.html" onSubmit="AddToCart(this);">
Quantity: <input type=text size=2 maxlength=3 name=QUANTITY
onChange='this.value=CKquantity(this.value)' value="1"><BR><BR>
Finish:
<input type="radio" name=ID_NUM value="M702-G" checked> Gold
<input type="radio" name=ID_NUM value="M702-S"> Silver
<input type="radio" name=ID_NUM value="M702-B"> Bronze<BR>
<input type=hidden name=ID_NUM value="Test">
<input type="image" src="./images/buynow.gif" border=0 value="Add to Cart" align=top>
<input type=hidden name=PRICE value="1.75">
<input type=hidden name=NAME
value="M702 Baseball Star Series Sport Medal">
<input type=hidden name=SHIPPING value=".795">
</FORM>
With the second form, when i try to access ID_NUM (from the shopping cart script), the value is undefined.
I;m sure that this is a simple issue (if you know the answer), but darned if I can find it.
I also tried re-naming the radio buttons to Finish, and inserting a javascript snippet in the html code after the radio button which follows:
<script type="text/javascript">
order.ID_NUM.value = order.Finish.value;
</script>
That did not work either.
Any help would be greatly appreciated.
Larry
I have been programming for a long time (since 1968), web programming is quite new to me, and I am baffled by an issue I am having which involves an HTML Form and a Java script handler. The form is for a shopping cart, and was working fine until I needed to add some radio buttons to specify the desired finish for a particular product. The code for the working form (different product) follows:
<FORM NAME=order ACTION="managecart.html" onSubmit="AddToCart(this);">
Quantity: <input type=text size=2 maxlength=3 name=QUANTITY
onChange='this.value=CKquantity(this.value)' value="1"><BR><BR>
<input type="image" src="./images/buynow.gif"
border=0 value="Add to Cart" align=top>
<input type=hidden name=PRICE value="2.95">
<input type=hidden name=NAME value="M802 Baseball Glitter Sport Medal">
<input type=hidden name=ID_NUM value="M802">
<input type=hidden name=SHIPPING value=".795">
</FORM>
Please note the value ID_NUM, this is what I want the radio button to populate. The non-working code follows:
<FORM NAME=order ACTION="managecart.html" onSubmit="AddToCart(this);">
Quantity: <input type=text size=2 maxlength=3 name=QUANTITY
onChange='this.value=CKquantity(this.value)' value="1"><BR><BR>
Finish:
<input type="radio" name=ID_NUM value="M702-G" checked> Gold
<input type="radio" name=ID_NUM value="M702-S"> Silver
<input type="radio" name=ID_NUM value="M702-B"> Bronze<BR>
<input type=hidden name=ID_NUM value="Test">
<input type="image" src="./images/buynow.gif" border=0 value="Add to Cart" align=top>
<input type=hidden name=PRICE value="1.75">
<input type=hidden name=NAME
value="M702 Baseball Star Series Sport Medal">
<input type=hidden name=SHIPPING value=".795">
</FORM>
With the second form, when i try to access ID_NUM (from the shopping cart script), the value is undefined.
I;m sure that this is a simple issue (if you know the answer), but darned if I can find it.
I also tried re-naming the radio buttons to Finish, and inserting a javascript snippet in the html code after the radio button which follows:
<script type="text/javascript">
order.ID_NUM.value = order.Finish.value;
</script>
That did not work either.
Any help would be greatly appreciated.
Larry