diff options
author | Marc Delisle <marc@infomarc.info> | 2012-05-24 21:15:26 +0400 |
---|---|---|
committer | Marc Delisle <marc@infomarc.info> | 2012-05-24 21:15:26 +0400 |
commit | 6735f741f07a1cad386727b563bd6997e5ffd7a9 (patch) | |
tree | 2f21489dae8d92d1be036e4ad791775856831109 /js/tbl_zoom_plot_jqplot.js | |
parent | 5c53fb643a16c8587c797bb0e2ec61bfe38e29af (diff) |
Put back changes from 9be5d8e0
Diffstat (limited to 'js/tbl_zoom_plot_jqplot.js')
-rw-r--r-- | js/tbl_zoom_plot_jqplot.js | 74 |
1 files changed, 70 insertions, 4 deletions
diff --git a/js/tbl_zoom_plot_jqplot.js b/js/tbl_zoom_plot_jqplot.js index 0ac6c13ff7..1797b158f3 100644 --- a/js/tbl_zoom_plot_jqplot.js +++ b/js/tbl_zoom_plot_jqplot.js @@ -128,19 +128,85 @@ $(document).ready(function() { ** Input form submit on field change **/ $('#tableid_0').change(function() { - $('#zoom_search_form').submit(); + //AJAX request for field type, collation, operators, and value field + $.post('tbl_zoom_select.php',{ + 'ajax_request' : true, + 'change_tbl_info' : true, + 'db' : window.parent.db, + 'table' : window.parent.table, + 'field' : $('#tableid_0').val(), + 'it' : 0, + 'token' : window.parent.token, + },function(data) { + $('#tabId tr:eq(1) td:eq(0)').html(data.field_type); + $('#tabId tr:eq(1) td:eq(1)').html(data.field_collation); + $('#tabId tr:eq(1) td:eq(2)').html(data.field_operators); + $('#tabId tr:eq(1) td:eq(3)').html(data.field_value); + xLabel = $('#tableid_0').val(); + $('#types_0').val(data.field_type); + $('#collations_0').val(data.field_collations); + }); }); $('#tableid_1').change(function() { - $('#zoom_search_form').submit(); + //AJAX request for field type, collation, operators, and value field + $.post('tbl_zoom_select.php',{ + 'ajax_request' : true, + 'change_tbl_info' : true, + 'db' : window.parent.db, + 'table' : window.parent.table, + 'field' : $('#tableid_1').val(), + 'it' : 1, + 'token' : window.parent.token, + },function(data) { + $('#tabId tr:eq(3) td:eq(0)').html(data.field_type); + $('#tabId tr:eq(3) td:eq(1)').html(data.field_collation); + $('#tabId tr:eq(3) td:eq(2)').html(data.field_operators); + $('#tabId tr:eq(3) td:eq(3)').html(data.field_value); + yLabel = $('#tableid_1').val(); + $('#types_1').val(data.field_type); + $('#collations_1').val(data.field_collations); + }); }); $('#tableid_2').change(function() { - $('#zoom_search_form').submit(); + //AJAX request for field type, collation, operators, and value field + $.post('tbl_zoom_select.php',{ + 'ajax_request' : true, + 'change_tbl_info' : true, + 'db' : window.parent.db, + 'table' : window.parent.table, + 'field' : $('#tableid_2').val(), + 'it' : 2, + 'token' : window.parent.token, + },function(data) { + $('#tabId tr:eq(6) td:eq(0)').html(data.field_type); + $('#tabId tr:eq(6) td:eq(1)').html(data.field_collation); + $('#tabId tr:eq(6) td:eq(2)').html(data.field_operators); + $('#tabId tr:eq(6) td:eq(3)').html(data.field_value); + $('#types_2').val(data.field_type); + $('#collations_2').val(data.field_collations); + }); }); $('#tableid_3').change(function() { - $('#zoom_search_form').submit(); + //AJAX request for field type, collation, operators, and value field + $.post('tbl_zoom_select.php',{ + 'ajax_request' : true, + 'change_tbl_info' : true, + 'db' : window.parent.db, + 'table' : window.parent.table, + 'field' : $('#tableid_3').val(), + 'it' : 3, + 'token' : window.parent.token, + },function(data) { + $('#tabId tr:eq(8) td:eq(0)').html(data.field_type); + $('#tabId tr:eq(8) td:eq(1)').html(data.field_collation); + $('#tabId tr:eq(8) td:eq(2)').html(data.field_operators); + $('#tabId tr:eq(8) td:eq(3)').html(data.field_value); + $('#types_3').val(data.field_type); + $('#collations_3').val(data.field_collations); + }); }); /** |