Added a new file for executing SQL Queries with an Ajax call. Still a
basic script, will be tested and improved.
This commit is contained in:
18
js/sql.js
Normal file
18
js/sql.js
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||||
|
/**
|
||||||
|
* function used wherever an sql query form is used
|
||||||
|
*
|
||||||
|
* @version $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
$("#sqlqueryform").live('submit', function(event) {
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
PMA_ajaxShowMessage();
|
||||||
|
|
||||||
|
$(this).append('<input type="hidden" name="ajax_request" value="true" />');
|
||||||
|
|
||||||
|
$.post($(this).attr('action'), $(this).serialize() , function(data) {
|
||||||
|
$("#sqlqueryresults").html(data);
|
||||||
|
})
|
||||||
|
})
|
Reference in New Issue
Block a user