01-11-2020, 05:45 PM
Please I need to execute some javascript commands in my project. I found that the CallBackResponse can do the job.
The issue I face is that the procedure is not working all the times.
The first example which i want to focus to a text box is working perfectly.
var
js: string;
begin
js := 'document.getElementById("TXTQUANTITY").focus();';
WebApplication.CallBackResponse.AddJavaScriptToExecuteAsCDATA(js);
end;
but when i try to run other commands it does nothing even a simple pop message
js:= 'windows.alert("I am an alert box!");';
WebApplication.CallBackResponse.AddJavaScriptToExecute(js);
Is there something else I have to pay attention.
i am running XE6 and Intraweb 14.0.50 version
The issue I face is that the procedure is not working all the times.
The first example which i want to focus to a text box is working perfectly.
var
js: string;
begin
js := 'document.getElementById("TXTQUANTITY").focus();';
WebApplication.CallBackResponse.AddJavaScriptToExecuteAsCDATA(js);
end;
but when i try to run other commands it does nothing even a simple pop message
js:= 'windows.alert("I am an alert box!");';
WebApplication.CallBackResponse.AddJavaScriptToExecute(js);
Is there something else I have to pay attention.
i am running XE6 and Intraweb 14.0.50 version