Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    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

    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);
    
    
    });




    }
    });
    Last edited by o0O0o.o0O0o; 05-13-2008 at 05:26 AM.
    Please de-reputate me
    © 0o0o0o0

    Its better to rule in Hell then to serve in Heaven


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •