Click to See Complete Forum and Search --> : onsubmit validate() not working
kjohn
07-17-2003, 04:22 PM
Can someone look at this code and tell me why my program submits without running my function validate();
Thank you!!!!
http://www.surgimark.com/products/checkout.htm
Khalid Ali
07-17-2003, 04:48 PM
tae a look at this part of the code in your form element
onsubmit="validate()"return document.MM_returnValue>
what you need to do is put the a code in qoutes
document.MM_returnValue
the above is out of qoutes
second you need to make sure that your function validate returns false in case form does not validate and then you need to get that return value
the correct code will be
onsubmit="return validte();return document.MM_returnValue">
kjohn
07-17-2003, 04:59 PM
Ok, I changed what you said, but it is still not working correctly.
It still goes directly to submiting the form w/out running the validate function...
http://www.surgimark.com/products/checkout.htm
kjohn
07-17-2003, 05:06 PM
figured it out, thank you!
Katie