Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-12-2008, 06:40 AM   PM User | #1
o0O0o.o0O0o
Senior Coder

 
o0O0o.o0O0o's Avatar
 
Join Date: Jan 2008
Location: C:\Windows\System32
Posts: 1,018
Thanks: 19
Thanked 9 Times in 9 Posts
o0O0o.o0O0o is infamous around these parts
jquery validation plugin help

This code is working fine


Code:
<script>


$.validator.setDefaults({



submitHandler: function() { 


     $('#signup_form').ajaxForm(); 


     var options = {
        target:        '#result',   // target element(s) to be updated with server response
        beforeSubmit:  showRequest,  // pre-submit callback
        success:       showResponse,  // post-submit callback
        clearForm: true,        // clear all form fields after successful submit
        resetForm: true        // reset the form after successful submit
    };
 



      $('#signup_form').Submit(options);
    
	
	
	
	
	
	
	} 
  });

but when i use this code , my form is submiited even its not validated



Code:
<script>


$.validator.setDefaults({



submitHandler: function() { 


     $('#signup_form').ajaxForm(); 


     var options = {
        target:        '#result',   // target element(s) to be updated with server response
        beforeSubmit:  showRequest,  // pre-submit callback
        success:       showResponse,  // post-submit callback
        clearForm: true,        // clear all form fields after successful submit
        resetForm: true        // reset the form after successful submit
    };
 



      $('#signup_form').submit(function(){



$(this).ajaxSubmit(options);


});




}
});
__________________
Please de-reputate me
© 0o0o0o0

Its better to rule in Hell then to serve in Heaven

Last edited by o0O0o.o0O0o; 05-13-2008 at 05:26 AM..
o0O0o.o0O0o is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:58 PM.


Advertisement
Log in to turn off these ads.