Move common code into a function

This commit is contained in:
Marc Delisle
2011-04-24 08:56:54 -04:00
parent 24e05e1cb2
commit 8f16bfbc53
6 changed files with 23 additions and 37 deletions

View File

@@ -283,9 +283,7 @@ $(document).ready(function() {
event.preventDefault();
PMA_ajaxShowMessage();
if (! $form.find('input:hidden').is('#ajax_request_hidden')) {
$form.append('<input type="hidden" id="ajax_request_hidden" name="ajax_request" value="true" />');
}
PMA_prepareForAjaxRequest($form);
$.post($form.attr('action'), $form.serialize(), function(data) {
if (typeof data.success != 'undefined') {