I have a MVC liferay portlet, and I use serveResource() for handle ajax call by JSP
Now, my problem is that I want call ajax function to populate datatables when I click on search button.
I have
<portlet:resourceURL var="ajaxResourceUrl"/>
This button fire after that I fill 6 input fields but it didn't work now! it return me an undefined message
$("#idPulsanteRicerca").click(function(){
oTable.fnReloadAjax();
});
I get correctly data from the serveResurce method on portlet load, but I want pass form parameters on click button event that I mentioned above and reload the datatable
$(document).ready(function() {
var oTable=$("#jqueryDataTable").dataTable({
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "<%=ajaxResourceUrl%>",
"bJQueryUI": true,
"aoColumns": [
{ "mData": "repositoryItem" },
{ "mData": "regionalNode" },
{ "mData": "localNode" },
{ "mData": "docName" },
{ "mData": "effectiveTime" }
]
});
Have Anyone just make this? Tnx for answer
jQuery('#example').dataTablein your success handler on the ajax call, passing in the returned data as thedataparameter.