hidden field should just be added once

This commit is contained in:
Marc Delisle
2010-09-19 11:16:52 -04:00
parent 316ea9f006
commit 3159d90867

View File

@@ -31,10 +31,13 @@ $(document).ready(function() {
PMA_ajaxShowMessage(PMA_messages['strSearching']);
$(this).append('<input type="hidden" name="ajax_request" value="true" />');
// add this hidden field just once
if (! $(this).find('input:hidden').is('#ajax_request_hidden')) {
$(this).append('<input type="hidden" id="ajax_request_hidden" name="ajax_request" value="true" />');
}
$.post($(this).attr('action'), $(this).serialize(), function(data) {
$("#searchresults").html(data);
})
})
}, 'top.frame_content'); // end $(document).ready()
}, 'top.frame_content'); // end $(document).ready()