JS, ASP: Best way to validate? easy [resolved]
Ok here is the plan:
PageA.asp has a form. On that form I have
txtUser
txtPassword
cmdSubmit
After hitting submit, user gets redirected to PageB.asp where the result (user data) is stored in a database.
Now, what is the best way to validate that the user has filled out all the fields.
Do I do it in PageB.asp or PageA.asp
I was thinking of embeding a simple JS function into
Code:
<FORM ACTION="JS FUNCTION HERE">
</FORM>
Is that possible? Is that a good way of doing it, or does it have something to do with the actual Submit button.
I'm also pretty sure I could check the values on PageB.asp, to see if they are blank and display an error... would that work?
Thanks a lot,
InVitro