I have a shopping cart that works great with one small exception. When you change the QTY and press enter the form executes with no valid data so it spits back NO Quantity entered.
I read this is a buggy thing and if I have (2) text fields it works without flaw but I don't need (2) I only need one.
CODE SAMPLE -----------------------------------------
<form action=updatecart.asp method=post>
<input type=text name=QTY size=1 value=<%=rs("QTY"%>>
<input type=hidden name=CARTID value=<%=rs("CARTID"%>>
<input type=submit name=Update value=Update>
</form>
I read to use the onSubmit = "return false" to disable the enter key and that does work but then my form breaks.
I need to use the onClick = formname.submit() I think but I can't seem to get the specifics on the use of that event.
I read this is a buggy thing and if I have (2) text fields it works without flaw but I don't need (2) I only need one.
CODE SAMPLE -----------------------------------------
<form action=updatecart.asp method=post>
<input type=text name=QTY size=1 value=<%=rs("QTY"%>>
<input type=hidden name=CARTID value=<%=rs("CARTID"%>>
<input type=submit name=Update value=Update>
</form>
I read to use the onSubmit = "return false" to disable the enter key and that does work but then my form breaks.
I need to use the onClick = formname.submit() I think but I can't seem to get the specifics on the use of that event.