Language: JavaScript
ajax form sample
function SaveComments() { // ID of the button, not a <input type="submit" /> // on page load... // $('#id_of_button_button_save_comments').click(function() { SaveComments(); }); alert('Saving comments...'); var commoptions = { success: function(responseText) { alert('Comment saved. Returned: '+responseText); // Inject the response somewhere // $('#id_of_response_div').html(responseText); } }; $('#id_of_form_you_are_submitting').ajaxSubmit(commoptions); }
Report Abuse
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search

