Check Form Script

hey there

I have a form with a text field and a submit button. I don’t want the form to submit if the text field is filled in correctly. for example a email address typed in the text field area. I’m working with spry validation but i guess i need to add some kind of onSubmit event, with javascript.

I have some idea but not sure what to fill in by the “if statements” in the script.

wow, cool that helped. Thank you so much!

and thanx for the article vnviews :slight_smile:

http://www5.brinkster.com/hiflyer/jscript/formchecktest.htm

<form ...stuff... onsubmit="return formchecker(this)">

If the function returns false then the form submit is cancelled. (ONLY if the client browser is set to run JavaScript code!)

:slight_smile:

See http://www.w3schools.com/js/js_form_validation.asp for instructions.