All pastes #383636 Raw Copy code Copy link Edit

Untitled

public unlisted text v1 · immutable
#383636 ·published 2007-03-06 14:55 UTC
rendered paste body

<?
 
session_start(); ?> 
<script type="text/javascript">
function pre(formdata) {
           $("#ab").html('loading');
          
var x1 = jQuery.fieldValue($("#sa1s")[0]);

}
function po(response) {
     var response = eval('('+ response +')');

//     if( response.status != 0 ) {
//           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: 'http://crazilla.linuxlab/php/proccessajax.php?x=' + x1
};
 
$(document).ready(function() {
           
    // bind form using 'ajaxForm'
    $("#MyForm1").validate({
                
 
        submitHandler: function(form) { 
            $(form).ajaxSubmit(options);
              
        }
    });
}); 
 
 
 
 
 
 
</script>