Is there any way to change fnServerParams after table has been initialised
Is there any way to change fnServerParams after table has been initialised
gordyr
Posts: 35Questions: 0Answers: 0
Is there any way of changing the settings of an already initialised datatable so that I can change content of $user_id in this example and then redraw the table?.
[code]"fnServerParams": function ( aoData ) {
aoData.push( { "name": "user", "value": '' + $user_id + '' } );
}, [/code]
Thanks
[code]"fnServerParams": function ( aoData ) {
aoData.push( { "name": "user", "value": '' + $user_id + '' } );
}, [/code]
Thanks
This discussion has been closed.
Replies
"fnServerParams": function ( aoData ) {
var userId = getUserId();
aoData.push( { "name": "user", "value": '' + userId+ '' } );
},
[/code]
All you need to do is define the function "getUserId" to do what is says on the tin :-)
Allan
Thanks as always Allan :-)