Display two tables
Display two tables
Hi,
I want to display two options say PHX and LEX and use jquery to display the corresponding table.
my cgi script has two table structures stored in $phx and $lex..So based on the user selection, only one variable would be printed.. I can do this with a simple form submission,but want to use jquery..
It would be great if i have those two radiobuttons in between show entries and search button of the table.
Any ideas would be appreciated...
I want to display two options say PHX and LEX and use jquery to display the corresponding table.
my cgi script has two table structures stored in $phx and $lex..So based on the user selection, only one variable would be printed.. I can do this with a simple form submission,but want to use jquery..
It would be great if i have those two radiobuttons in between show entries and search button of the table.
Any ideas would be appreciated...
This discussion has been closed.
Replies
if i use sAjaxSource="json.cgi",it is working
Ok Here's my code:
[code]
var oTable;
\$(document).ready(function() {
oTable = \$('#example').dataTable( {
"sAjaxSource": 'json.cgi?period=$period',
"fnInitComplete": function ( oSettings ) {
\$(oTable.fnGetNodes()).click( function () {
var iPos = oTable.fnGetPosition( this );
var aData = oSettings.aoData[ iPos ]._aData;
window.open('jp.cgi?domain=$domain&job='+aData[0]+'&org='+aData[1],'Job-Detail','width=1024,height=768,resizable=yes,scrollbars=yes');
} );
}
} );
} );
[/code]