troubleshooting Question

JQuery validation - error message not showing in Internet Explorer

Avatar of gublooo
gubloooFlag for India asked on
CSSjQuery
3 Comments1 Solution1563 ViewsLast Modified:
Dear Experts,

Running into an issue with Internet explorer. I am doing form validation using Jquery. Most of the checks are standard like "required, min length, max length, email format etc"- All these error messages are showing up fine in all browsers.

Now just for the email field, apart from the email format, I'm also checking in the database to see if the email already exists - and if it does - show an error message to user.

In FireFox,Chrome - if the email address exists - it comes back and displays error saying -"Email id abc@yahoo.com is already registered"

But in Internet Explorer - nothin happens - no error message is shown and the form just stays and nothing happens.

Any idea what this issue could be - I'm attaching the code below

thanks for your help
<script language="javascript">
	$(function(){
		// Setup de dialog box
		initDialog();
		$('#dialog').dialog('option', 'title', 'Register');
		$('#dialog').dialog('option', 'width', 340);
		$('#dialog').dialog('option', 'buttons', {
			'Send': function(){
				$('#frmRegister').submit();
			},
			'Cancel': function(){
				$(this).dialog("close");
			}
		});
		$('#dialog').dialog('open');

		// validate the form
		$('#frmRegister').validate({
			submitHandler: function(){
				$.post(baseUrl + '/register/register', $('#frmRegister').serialize(), function(data){
					$('#dialog').html(data);
				});
				$('#dialog').dialog('destroy');
				$(this).submit();
			},
			rules: {
				password: {
					rangelength: [8, 16]
				},
				password2: {
					equalTo: "#password"
				},
				email: {
					remote: baseUrl + '/register/check-email'
				}
			},
			messages: {
				email: {
					remote: jQuery.format("{0} is already registered.")
				}
			},
			onkeyup: false,
			onfocusout: false,
			focusCleanup: true,
			focusInvalid: false,
			debug: false
		});

	})
</script>
<form name="frmRegister" id="frmRegister" class="frm" method="post" action="<?php echo $this->baseUrl(); ?>/register/register">
	<input type="hidden" name="redirect" value="<?php echo $this->getRequest()->getParam('redirect'); ?>"/>
	<input type="hidden" name="redirect_type" value="<?php echo $this->getRequest()->getParam('redirect_type'); ?>"/>
	<fieldset>
		<legend>Acount details</legend>

		<label for="name">Full name</label>
		<input type="text" name="name" id="name" class="required"/>
		<br/>
		
		<label for="name">Mobile Number</label>
		<input type="text" name="mobile_number" id="mobile_number" class="required"/>
		<br/>

		<label for="email">Email</label>
		<input type="text" name="email" id="email" class="required email"/>
		<br/>

		<label for="password">Password</label>
		<input type="password" name="password" id="password" class="required"/>
		<br/>

		<label for="password2">Retype password</label>
		<input type="password" name="password2" id="password2" class="required"/>
		<br/>
	</fieldset>
</form>
ASKER CERTIFIED SOLUTION
xberry

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros