Mohan
Mohan

Reputation: 69

How to call action from ajax

I am working with struts2 and ajax . I am using jboss as application server, I am calling jsp page and there from i am calling action. Can i able to call action from my ajax source directly, without calling jsp page instead of.I am loading data in table My ajax code follows

oTable=$('#tblDisplay').dataTable( {
                "bAutoWidth": false,
                "oLanguage": {"sSearch": "Search all columns:"},
                "bJQueryUI": true,   
                "aLengthMenu": [[-1,10, 25, 50, 100,250],["All",10, 25, 50, 100,250]],
                "sPaginationType": "full_numbers",  
                "iCookieDuration": 60*60*24*10,
                "sCookiePrefix": "SQLFly_admin_datatable_",
                "aaSorting": [],
                "aaSortingFixed": [],
                "asStripClasses": [ "odd", "even"],
                "sScrollY": "",
                "bScrollCollapse": true,
                "bSortCellsTop": false,
                "bDeferRender": true,
                "sScrollX": "",
                "sScrollXInner": "",
                "aoColumnDefs": [{ "bSearchable": false,  "bVisible": false, "aTargets": [0] }],
                "bProcessing": true,
                "bServerSide": false,
                "iDisplayStart": iStart,
                "iDisplayLength": iDisplayLength,
                "bStateSave": false,
                "sAjaxSource": "sPermissonData.jsp",
                "fnServerData": function ( sSource, aoData, fnCallback ) 
                {
                   $.ajax({"dataType": 'json', "cache":false, "type": "GET", "url": sSource, "data": aoData , "success": fnCallback } );
                 },

Thank You

Upvotes: 0

Views: 557

Answers (1)

Related Questions