Jquery form validate plugin with jquery Form plugin


Hi,

are you bored with the form validation and form submission in traditional way then try this example this will minimize your task and save your development time.

first let me introduce the jquery plug-ins that we are going to use in this example. the first one is Jquery Validation plugin available here . this plugin help to quick validate your html form. please read the docs for mor details.

another plugin we are using here is ajaxForm plugin available here  . very use full for form processing.

Example

$(document).ready(function(){
   
              var options = {
        target:        '#output1',   // target element(s) to be updated with server response
        beforeSubmit:  showRequest,  // pre-submit callback
        success:       showResponse  // post-submit callback
            };
           
            $("#form1").validate();
             $('#form1').ajaxForm(options);
           
    });


function showRequest(formData, jqForm, options) {
    return $("#form1").valid();
}

function showResponse(responseText, statusText, xhr, $form)  {

    //alert('status: ' + statusText + '\n\nresponseText: \n' + responseText +  '\n\nThe output div should have already been updated with the responseText.');
    }

0 comments:


PHP developer Cochin |PHP developer Kerala | PHP developer India | Flash developer/programmer Cochin | Flash developer/programmer Kerala | Flash developer/programmer India | web programmer kerala |web programmer Cochin |web programmer India |web developer kerala |Web developer Cochin | Kerala PHP | PHP freelancer| flash actionscript freelancer