How to pass a callback to be executed in the mRender?
How to pass a callback to be executed in the mRender?
jsabino
Posts: 1Questions: 0Answers: 0
Hi,
I want to pass a callback in the result of the ajax call, something like this:
[code]
{
"aaData": [
[
"1",
"Internet Explorer 4.0",
"Win 95+",
"4",
"X"
],
[
"2",
"Internet Explorer 5.0",
"Win 95+",
"5",
"C"
],
[
"2",
"Internet Explorer 5.5",
"Win 95+",
"5.5",
"A"
]
],
"callbacks": [
"function(data){ if (data == 1) return 'Yes'; else return 'No'; }"
]
}
[/code]
For this, i will need to access the response of the ajax call, is it possible?
I want to pass a callback in the result of the ajax call, something like this:
[code]
{
"aaData": [
[
"1",
"Internet Explorer 4.0",
"Win 95+",
"4",
"X"
],
[
"2",
"Internet Explorer 5.0",
"Win 95+",
"5",
"C"
],
[
"2",
"Internet Explorer 5.5",
"Win 95+",
"5.5",
"A"
]
],
"callbacks": [
"function(data){ if (data == 1) return 'Yes'; else return 'No'; }"
]
}
[/code]
For this, i will need to access the response of the ajax call, is it possible?
This discussion has been closed.
Replies
No - functions are not valid JSON and therefore you cannot pass a function back through JSON.
Allan