I'm wondering if it is possible to call a function from a java json object?
Example
java:
JSONObject json = new JSONObject();
json.put("fnRowCallback", "test()");
jquery:
$ (function () {
"use strict";
function test() {
alert('test');
}
}(jQuery));
Ultimate accomplishment needed.
JSONObject json = new JSONObject();
json.put("fnRowCallback", function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
if (aData["rush"] == "Rush" ) {
$(nRow).addClass("gradeX");
}
});
test()on the client. How is it likely to achieve?