Change ajax post-data
Change ajax post-data
j3ff3
Posts: 3Questions: 0Answers: 0
Hello. I have a code:
[code]
$('#table').DataTable({
...
ajax: {
'url': '/url',
'type': 'POST',
'data': {
'test': 0
}
}
})
[/code]
Also i have a two buttons (for example #Button1 and #Button2). If i clicked on Button1 i want to set ajax-data property 'test' to 1, if clicked on Button2 - set property 'test' to 2 AND reload table (resend ajax-request with refreshed 'test' property), not fully rebuild. Is it possible? I can't change 'test' property after table was init.
[code]
$('#table').DataTable({
...
ajax: {
'url': '/url',
'type': 'POST',
'data': {
'test': 0
}
}
})
[/code]
Also i have a two buttons (for example #Button1 and #Button2). If i clicked on Button1 i want to set ajax-data property 'test' to 1, if clicked on Button2 - set property 'test' to 2 AND reload table (resend ajax-request with refreshed 'test' property), not fully rebuild. Is it possible? I can't change 'test' property after table was init.
This discussion has been closed.
Replies
Allan