09-10-2019, 04:15 AM
Can someone explain the parameters in the ajaxCall functions?
Thanks
iw15.1.4
Thanks
iw15.1.4
ajaxCall question
|
09-10-2019, 04:15 AM
Can someone explain the parameters in the ajaxCall functions?
Thanks iw15.1.4
09-10-2019, 02:30 PM
function ajaxCall(ACallbackName, AParams, ALock);
09-10-2019, 06:38 PM
09-10-2019, 09:56 PM
(09-10-2019, 06:38 PM)DanBarclay Wrote: Is this what you are looking for? Let me be more specific. On the javascript call below the 3rd parameter is false. What does this parameter control? Code: ajaxCall("Multiply", "&x=5&y=10", false, function(response) {alert("Result is: " + response);});
09-10-2019, 10:01 PM
Quoted directly from the link that Dan posted:
"Multiply" function can be called from JavaScript using something as: ajaxCall("Multiply", "&x=5&y=10", false, function(response) {alert("Result is: " + response);}); In the above example, the callback function receives 2 parameters named x and y, and multiply them. The result is put into aResult parameter (which is an out parameter) The difference here compared to old versions is that aResult string is returned to the browser as is, i.e. the response will contain a string representing the result of the multiplication of x by y only, nothing else. This makes much easier to interface with existing JavaScript libraries which expect specific responses (e.g. JSON strings). The forth type of callback (TIWCallbackProc3) is the most flexible one. It allows you to set the result directly using variable aResult (as above) or still use TIWApplication.CallbackResponse object (as in IW 15.0), or yet, bypass the response completely setting aHandled parameter to True. Setting aHandled to True means that the user code is responsible for creating the reponse. In this case, IntraWeb will skip the execution of callback response code completely.
09-11-2019, 02:31 AM
(09-10-2019, 10:01 PM)kudzu Wrote: Quoted directly from the link that Dan posted: Thanks for pointing it out. |
« Next Oldest | Next Newest »
|