Dynamic Ajax call help please.
Dynamic Ajax call help please.
The initial landing page will loaded with ajax call with action of ajaxOpenCall. Then once the page loaded it will have three buttons and when we click any of these buttons it should change action as describes below.
It have
[code]
[/code]
when i click the above buttons i want to change the &action=ajaxOpenCall' to open when open button is clicked or to recent when recent button is clicked and so on.
I think it is more of a dynamic ajax call i am thinking.
[code]
$(document).ready( function () {
var oTable = $('#myTable').dataTable( {
"sAjaxSource":"",
"aoColumns": [
{ "mData": "priority"},
{ "mData": "ticketId"},
{ "mData": "status"},
{ "mData": "type" },
{ "mData": "subject"},
{ "mData": "dateOpened"},
{ "mData": "dateModified"},
{ "mData": "dateClosed"},
{ "mData": "reportedBy"},
{ "mData": "siteId"},
{ "mData": "siteName"},
{ "mData": "address"}
],
"bSort": true,
"bScrollInfinite": true,
"bScrollCollapse": true,
"sScrollY": 350,
"oLanguage": {"sInfo": "Total records: _TOTAL_"}
} );//datatable
$(window).bind('resize', function () {
oTable.fnAdjustColumnSizing();
} ); //resize
} );//ready
[/code]
Thank you very much Alan for all the help .
It have
[code]
[/code]
when i click the above buttons i want to change the &action=ajaxOpenCall' to open when open button is clicked or to recent when recent button is clicked and so on.
I think it is more of a dynamic ajax call i am thinking.
[code]
$(document).ready( function () {
var oTable = $('#myTable').dataTable( {
"sAjaxSource":"",
"aoColumns": [
{ "mData": "priority"},
{ "mData": "ticketId"},
{ "mData": "status"},
{ "mData": "type" },
{ "mData": "subject"},
{ "mData": "dateOpened"},
{ "mData": "dateModified"},
{ "mData": "dateClosed"},
{ "mData": "reportedBy"},
{ "mData": "siteId"},
{ "mData": "siteName"},
{ "mData": "address"}
],
"bSort": true,
"bScrollInfinite": true,
"bScrollCollapse": true,
"sScrollY": 350,
"oLanguage": {"sInfo": "Total records: _TOTAL_"}
} );//datatable
$(window).bind('resize', function () {
oTable.fnAdjustColumnSizing();
} ); //resize
} );//ready
[/code]
Thank you very much Alan for all the help .
This discussion has been closed.
Replies
ajax will be called with the new server parameter.
$(document).ready(function() {
[code]
$("#btn").click(function(){
alert("Nand");
oTable.fnReloadAjax("sources/Nand.txt");
[/code] }
);