![]() |
|
async-event and page refresh - Printable Version +- Atozed Forums (https://www.atozed.com/forums) +-- Forum: Atozed Software (https://www.atozed.com/forums/forum-1.html) +--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html) +---- Forum: English (https://www.atozed.com/forums/forum-16.html) +----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html) +----- Thread: async-event and page refresh (/thread-2384.html) |
async-event and page refresh - kpenzkofer - 04-30-2021 We often use async events, but it happens from time to time that we have to refresh the whole page in certain cases - as a result of an asnyc event. Can that be done in any way? RE: async-event and page refresh - kpenzkofer - 05-08-2021 We solved this with an OnTimer event. If callback routines are triggered via dialogues, then some controls could not be updated (runs asynchronously, I think). Now we start a timer with a short interval in the callback function. That works very well. As a short notification is posted also, that fits quite well anyway. RE: async-event and page refresh - jeroen.rottink - 05-10-2021 Following works for me. Call it from your Async... event Code: procedure TDlgBase.TriggerFullPostFromAsyncEvent;RE: async-event and page refresh - Alexandre Machado - 05-15-2021 (05-10-2021, 09:02 AM)jeroen.rottink Wrote: Following works for me. Call it from your Async... event 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;Cheers RE: async-event and page refresh - Alexandre Machado - 05-19-2021 We are adding a new method to TIWForm which will do this automagically. You just need to call IWForm.ReloadAsync; and it will take care of that for you. Cheers RE: async-event and page refresh - jeroen.rottink - 05-19-2021 (05-19-2021, 01:19 AM)Alexandre Machado Wrote: We are adding a new method to TIWForm which will do this automagically. You just need to call Hi Alexandre, Nice but please check if reload() still should take a parameter. See https://stackoverflow.com/questions/55127650/location-reloadtrue-is-deprecated Kind regards, Jeroen. RE: async-event and page refresh - Alexandre Machado - 05-19-2021 (05-19-2021, 05:30 AM)jeroen.rottink Wrote:(05-19-2021, 01:19 AM)Alexandre Machado Wrote: We are adding a new method to TIWForm which will do this automagically. You just need to call Hi Jeroen, thanks for the heads up. Yes, I'm aware that there is an optional parameter that was made deprecated recently. On the page that you pointed out some users claim that some browsers will ignore the flag. Once IW is still supposed to support some older browsers (like IE), I'm keeping the parameter for now, because I couldn't find any browser that won't work with it. I believe all the browsers will just ingore whatever parameter you pass (true or false) and will always load it the same way. Later we can change the call and remove the parameter. RE: async-event and page refresh - raulevm - 03-03-2023 Intraweb does not recognize this method (IWForm1.ReloadAsync)for me in version 15.2.69. Is there a library to include in the uses clause? RE: async-event and page refresh - jeroen.rottink - 03-06-2023 The method is called AsyncReload() RE: async-event and page refresh - Alexandre Machado - 03-21-2023 Ouch, thanks for the correction Jeroen. It is AsyncReload() indeed. Have no idea WTH I was thinking :-) |