Dynamic Ajax call help please.

Dynamic Ajax call help please.

nandrainandrai Posts: 26Questions: 0Answers: 0
edited August 2013 in General
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 .

Replies

  • nandrainandrai Posts: 26Questions: 0Answers: 0
    on click of those buttons i want to call the datable' Ajax and update the server parameter so that
    ajax will be called with the new server parameter.
  • nandrainandrai Posts: 26Questions: 0Answers: 0
    I got it work

    $(document).ready(function() {
    [code]
    $("#btn").click(function(){
    alert("Nand");
    oTable.fnReloadAjax("sources/Nand.txt");
    [/code] }
    );
This discussion has been closed.