1
I am trying to show different tables according to what the user chooses. I have an example of a user who shared his code through the link:
http://jsfiddle.net/onury/kBQdS/
The table is updated via the buttons below:
$('#btn-load').click(function(e) {
dt.load(data1);
});
$('#btn-update').click(function(e) {
dt.load(data2);
});
$('#btn-append').click(function(e) {
dt.load(data1, true);
});
$('#btn-clear').click(function(e) {
dt.clear();
});
However, my question is exactly why instead of the table values being changed by button, would you like it to be changed by a dropdown? Can someone help me tell a function that would do that?
Thank you,
Andre, it worked out and everything. Inside this form I’m making there are some more codes that end up updating the page. And every time he updates, he loses the information of which item was selected. Is there any way when the person selects it to stay fixed?
– user2287892
depends on how the page is updated... my suggestion is to put your entire code in a new question, so both I and other users can see the whole and we can suggest you the best solution.
– andrepaulo