Quantcast
Channel: Free community support — DataTables forums
Viewing all articles
Browse latest Browse all 35607

Prevent serverside processing in fnServerParams

$
0
0

Following is my code:

"fnServerParams": function (oData) { if((sDateTime == undefined || sDateTime =="") && $('#measurement_length select').val() == -2 ){ alert("Please select date") return false; } if($('#measurement_length select').val() == -2 ){ sData = " start_time <= '"+sDateTime+"'"; if($('#measurement_length select').val() == -2 ) { sData += " group by name " } oData.push({ "name": "extra_sql", "value": sData }); } }

I need to send additional data to the server side script only if the iDisplayLength is -2 and sDateTime is defined to valid value. However, regardless of setting return false, the data is requested. How do I pervent this?


Viewing all articles
Browse latest Browse all 35607

Trending Articles