Re: Reload detection



On Mon, 16 Jul 2007 23:29:26 +0200, Jan Ostedt <ostedt@xxxxxxxxxx> wrote:

So I have already tried to implement IOleCommandTarget, but I will give it another go. May be
I did something wrong. It seems strange that the OLECMDID_PREREFRESH appears late in the
refresh process. Is there anybody else in the group that has experience in this area?

Now I have implemented IOleCommandTarget again and my tests reveal that the OLECMDID_PREREFRESH
actually appears very late in the refresh process, in spite of its name. The browser calls my IOleCommandTarget::Exec
many times before the OLECMDID_PREREFRESH shows up. Several of the calls have undocumented command IDs.
My intention is to detect and cancel refreshes caused by javascript location.reload(false) and location.reload(true). So
I decided to see if it was at all possible to cancel the refresh at this stage. So at the first call to
IOleCommanTarget::Exec (and at subsequent calls) after a refresh I tried to cancel the operation. First I tried
different return values but that didn't help so I changed to IWebBrowser2::Stop, which made the refresh stop, but I
ended up with a blank page instead of the original one. Very similar to what happened when I tested my PassThruApp
approach. Unfortunately it seems like this approach doesn't work either. Is there anybody in the group that has ideas
about how a javascript.reload operation can be detected and canceled? Suggestions would be greatly appreciated.

Best Regards
Jan

www.learnware.se
.



Relevant Pages

  • Re: Problem Saving Changed Data
    ... The Macro or Function set to the BeforeUpdate or ValidationRule (I ... all you have to do is set Cancel = True to NOT ... By trying to call a refresh in this event you are ...
    (microsoft.public.access.formscoding)
  • Re: Reload detection
    ... to identify a refresh, but if I want to cancel the operation I think it's too late ... to detect it in DownloadBegin. ... // variable to tell us whether a refresh request has started. ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • Retry or Cancel
    ... I have recently started working on WinXP Pro & use IE6.0 as the default ... Click Retry to send the information again, or click Cancel to return to ... Now what I find is if I refresh a page after a Form residing in this ... Is this an inherent behavior of IE6.0 in WinXP ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Refreshing after cancel changes
    ... >have a before update event that asks if it is okay to ... but what I would like to do is refresh the ... >Would it be best to create a msgbox with Yes, No, Cancel ...
    (microsoft.public.access.formscoding)
  • Refreshing after cancel changes
    ... have a before update event that asks if it is okay to save ... but what I would like to do is refresh the ... Would it be best to create a msgbox with Yes, No, Cancel ...
    (microsoft.public.access.formscoding)