I have a js file called example.js
which has a line as follows:
gridOptions.api.setRowData(createRowData());
Then there's another file data.js
which has the createRowData()
function that should return ROW_DATA
. It is as follows:
function createRowData() {
jQuery.getJSON('/file.txt',function(ROW_DATA){
return ROW_DATA;
});
}
But, whenever this createRowData()
function is called from example.js
file, it does not go inside the jQuery
block and simply comes to the last curly bracket. Can anyone please tell me what is going wrong here??