Link to home
Start Free TrialLog in
Avatar of dolythgoe
dolythgoe

asked on

Form error validation and AJAX submission

Hi all,

I have a simple form:

	<form method="post" action="">
		<label for="usrname">Username</label>
		<input type="text" name="usrname" id="usrname" maxlength="12"/><span id="usrcheck" style="display:none"></span>
		
		
		<label for="pwd">Password</label>
		<input type="password" name="pwd" id="pwd" maxlength="12"/><span id="pwdcheck" style="display:none"></span>
		
	
		<label for="Email">Email</label>
		<input type="text" name="email" id="email" maxlength="75"/><span id="emailcheck" style="display:none"></span>
		
		<input type="submit" name="submit" value="Signup" class="submit-button" />
	</form>

Open in new window


I'm error checking in realtime as the user moves through it.

My question is 3 parts:

-how can I enable the submit button once all the fields are correctly verified using jquery?
-how does jQuery post data to a .php file for processing
-ho do I replace the form HTML with a success message

I'm thinking that on any blur() to check for 3 valid criteria except the final input field (email) the user is likely to hit enter and blur() would not be called in order to enable the submit function.

Any pointers much appreciated.
ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial