diff options
author | Marc Delisle <marc@infomarc.info> | 2012-05-24 21:55:01 +0400 |
---|---|---|
committer | Marc Delisle <marc@infomarc.info> | 2012-05-24 21:55:01 +0400 |
commit | 3044b490947a94aa70b4b6f3171a8ced2bc7b25b (patch) | |
tree | 1348af813a50104e582a0c61b4401848157c842c | |
parent | 50333c6faafb091c6b4f36449c3f9acf548e67b9 (diff) |
store type for X and Y values
-rw-r--r-- | js/tbl_zoom_plot_jqplot.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/js/tbl_zoom_plot_jqplot.js b/js/tbl_zoom_plot_jqplot.js index 45363b1d66..5add0bea64 100644 --- a/js/tbl_zoom_plot_jqplot.js +++ b/js/tbl_zoom_plot_jqplot.js @@ -113,6 +113,7 @@ $(document).ready(function() { var searchedDataKey = null; var xLabel = $('#tableid_0').val(); var yLabel = $('#tableid_1').val(); + // will be updated via Ajax var xType = $('#types_0').val(); var yType = $('#types_1').val(); var dataLabel = $('#dataLabel').val(); @@ -127,6 +128,8 @@ $(document).ready(function() { /** ** Input form submit on field change **/ + + // first column choice corresponds to the X axis $('#tableid_0').change(function() { //AJAX request for field type, collation, operators, and value field $.post('tbl_zoom_select.php',{ @@ -144,10 +147,12 @@ $(document).ready(function() { $('#tableFieldsId tr:eq(1) td:eq(3)').html(data.field_value); xLabel = $('#tableid_0').val(); $('#types_0').val(data.field_type); + xType = data.field_type; $('#collations_0').val(data.field_collations); }); }); + // second column choice corresponds to the Y axis $('#tableid_1').change(function() { //AJAX request for field type, collation, operators, and value field $.post('tbl_zoom_select.php',{ @@ -165,6 +170,7 @@ $(document).ready(function() { $('#tableFieldsId tr:eq(3) td:eq(3)').html(data.field_value); yLabel = $('#tableid_1').val(); $('#types_1').val(data.field_type); + yType = data.field_type; $('#collations_1').val(data.field_collations); }); }); |