mercredi 13 juillet 2016

ajaxForm(options) what should be passed to the options?


$(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 }; $('#myForm1').ajaxForm(options); }); function showRequest(formData, jqForm, options) { var queryString = $.param(formData); alert('About to submit: nn' + queryString); return true; } function showResponse(responseText, statusText) { alert('status: ' + statusText + 'nnresponseText: n' + responseText + 'nnThe output div should have already been updated with the responseText.'); } In the above program what is passed in the option argument?I use the http://jquery.malsup.com/

Aucun commentaire:

Enregistrer un commentaire