Hello,
Is there a way? If when done use the command JavaScript (may be calling a JS function or changing a variable in JS) with Dephi and let that command run. without having to wait for the end of that Event
I would like to expand on the above message as follows. :
Because of that from which I tested for example
Inside the event of IWBTN1AsyncClick
I have a loop, or a Delphi subcommand loop, to do something. And in the meantime I want to change JS variable values or call JS functions with Delphi.
Let me give you a simple example:
Or to give a clearer example, let's say I have a JS Plugins to display the Cricle Pregress Loader and show the value as a percentage. while some operations are in progress This will prevent the user from clicking anywhere and knowing that the process is in progress.
But the result is not what I want.
That is, the value that I want to change or the function that I want to call. It wasn't immediately called. But only to be called at the end of the event of IWBTN1 being clicked.
Please suggest me what should I do or use.
Thank you
Is there a way? If when done use the command JavaScript (may be calling a JS function or changing a variable in JS) with Dephi and let that command run. without having to wait for the end of that Event
I would like to expand on the above message as follows. :
Because of that from which I tested for example
Inside the event of IWBTN1AsyncClick
I have a loop, or a Delphi subcommand loop, to do something. And in the meantime I want to change JS variable values or call JS functions with Delphi.
Let me give you a simple example:
Code:
for I := 0 to 100 do
begin
for J:= 0 to 10000000 do
//--DO something
begin
end;
//-- Call JS function to update progress value :
WebApplication.CallBackResponse.AddJavaScriptToExecute('UpdateProgress("Processing..", "' + I.tostring +'");');
// WebApplication.ExecuteJS('UpdateProgress("Processing..", "' + I.tostring +'");');
// AddToInitProc('UpdateProgress("Processing..", "' + I.tostring +'");');
// IWBTN1.AddJavaScriptToExecute('UpdateProgress("Processing..", "' + I.tostring +'");');
//-- or Maybe Update JS value :
WebApplication.CallBackResponse.AddJavaScriptToExecute('MyPlVar = ' + I.tostring + ';');
// WebApplication.ExecuteJS('MyPlVar = ' + I.tostring + ';');
// AddToInitProc('MyPlVar = ' + I.tostring + ';');
end;
Or to give a clearer example, let's say I have a JS Plugins to display the Cricle Pregress Loader and show the value as a percentage. while some operations are in progress This will prevent the user from clicking anywhere and knowing that the process is in progress.
But the result is not what I want.
That is, the value that I want to change or the function that I want to call. It wasn't immediately called. But only to be called at the end of the event of IWBTN1 being clicked.
Please suggest me what should I do or use.
Thank you
