$(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 
		} ; 
			

	$(id_form).ajaxForm(options);
	
 
});

/*
// pre-submit callback 
function showRequest(formData, jqForm, options) {
    // formData is an array; here we use $.param to convert it to a string to display it 
    // but the form plugin does this for you automatically when it submits the data 
    var queryString = $.param(formData); 
 
    // jqForm is a jQuery object encapsulating the form element.  To access the 
    // DOM element for the form do this: 
    // var formElement = jqForm[0]; 
 
    alert('About to submit: \n\n' + queryString); 
 
    // here we could return false to prevent the form from being submitted; 
    // returning anything other than false will allow the form submit to continue 
    return true; 
}
*/
 
// post-submit callback 
function showResponse(responseText, statusText)  
{
  if (statusText=='success') eval(responseText);
}
