Change server-side database table name
Change server-side database table name
binaryechoes
Posts: 2Questions: 0Answers: 0
Hello all,
This is probably incredibly easy but I'm have trouble finding out the *best* way to send a different database table name to the server script for processing.
When the user first loads the page it will load data from database.tableA. However, if they select a different option from a dropdown menu then it should use database.tableB. I was planning on using onchange and fnServerParams but I'm not certain.
Thanks, any help is greatly appreciated.
This is probably incredibly easy but I'm have trouble finding out the *best* way to send a different database table name to the server script for processing.
When the user first loads the page it will load data from database.tableA. However, if they select a different option from a dropdown menu then it should use database.tableB. I was planning on using onchange and fnServerParams but I'm not certain.
Thanks, any help is greatly appreciated.
This discussion has been closed.
Replies
[code]
var table = $("#select_table").val();
[/code]
..
[code] "fnServerParams": function ( aoData ) {
aoData.push( {
"name": "table_name",
"value" : table
});
}
[/code]
I also needed to set the tables width after calling fnDestroy.
[code]
$("#my_table").css("width", "100%");
[/code]