I am having the hardest time with this validation script!
I tried:
1) Running through the values, and creating a string with all bad values, and if there are any, printing them to the screen. I do not want to do this in an alert. I would like to have a header tag at the top of the reloaded form page, with all filled in textboxes still filled in, and the header tag displaying the string. The string part I got no problem, but the page just displays the header tag, no form. Can someone help? How can I reload the page with the tag on top?
2) Rewriting the entire form, with black labels if correct values, and red ones if incorrect. This works fine. However, if the second time around is still not filled in properly, it submits anyway, because the document.write at the beginning of the line cancels out the onSubmit="chkForm()".
3) Someone here suggested using .innerHTML, which I just discovered doesn't work very well for tables, so instead of parsing the code, it just spits it all out onto the screen.
I would really appreciate some help and direction!
Thanks!
I tried:
1) Running through the values, and creating a string with all bad values, and if there are any, printing them to the screen. I do not want to do this in an alert. I would like to have a header tag at the top of the reloaded form page, with all filled in textboxes still filled in, and the header tag displaying the string. The string part I got no problem, but the page just displays the header tag, no form. Can someone help? How can I reload the page with the tag on top?
2) Rewriting the entire form, with black labels if correct values, and red ones if incorrect. This works fine. However, if the second time around is still not filled in properly, it submits anyway, because the document.write at the beginning of the line cancels out the onSubmit="chkForm()".
3) Someone here suggested using .innerHTML, which I just discovered doesn't work very well for tables, so instead of parsing the code, it just spits it all out onto the screen.
I would really appreciate some help and direction!
Thanks!