Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I am having the hardest time with t

Status
Not open for further replies.

frogggg

Programmer
Jan 17, 2002
182
US
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!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top