All pastes #383367 Raw Edit

Miscellany

public text v1 · immutable
#383367 ·published 2007-03-06 09:26 UTC
rendered paste body
 <script type="text/javascript">
function pre(formdata) {
           $("#ab").html('loading');
          
}
function po(response) {
     var response = eval('('+ response +')');

     if( response.status != "error" ) {
           statusmsg = "Thanks for the submit";
     } else {
           statusmsg = "Your form submission was not succesful";
     }
 
     $("#ab").html(response.data);
}
var options = { 
   beforeSubmit:  pre,  // pre-submit callback
   success:       po, // post-submit callback
   type:        'post',
 
   url: 'proccessajax.php'
};
 
$(document).ready(function() {
           
    // bind form using 'ajaxForm'
    $("#form1").validate({
		

        submitHandler: function(form) { 
            $(form).ajaxSubmit(options);
              
        }
    });
}); 






</script>
 //stable