05-15-2021, 10:19 AM
(05-10-2021, 09:02 AM)jeroen.rottink Wrote: Following works for me. Call it from your Async... event
Code:procedure TDlgBase.TriggerFullPostFromAsyncEvent;
var js: string;
begin
// https://forums.embarcadero.com/thread.jspa?messageID=675140򤵄
js := 'location.reload();';
WebApplication.CallBackResponse.AddJavaScriptToExecuteAsCDATA(js);
end;
Hi Jeroen,
thanks for your input. That's exactly how I would do it.
Optionally a boolean parameter can be used when calling reload() which instructs the browser to bypass the cache and request it again from the server:
Code:
procedure TDlgBase.TriggerFullPostFromAsyncEvent;
var js: string;
begin
js := 'location.reload(true);';
WebApplication.CallBackResponse.AddJavaScriptToExecuteAsCDATA(js);
end;Cheers

