Re: window.onunload with ie 6.0 (XP SP1)

From: Silvan Gehrig (news_at_mcdark.ch)
Date: 09/21/04


Date: Tue, 21 Sep 2004 20:48:08 +0200

Hi Hsun-Cheng Hu

Thank you very mutch for your investigation. I haven't
thought that the google toolbar makes problems like this.
I've assumed that popup-blockers disable the window.open
directive only. Therefor I didn't test anything like this... I'll
try your solution tomorrow in the morning.

Thanks again :-)

Cheers Silvan

"Hsun-Cheng Hu ?J?V??" <hucheng@ms2.url.com.tw> schrieb im Newsbeitrag
news:39db34a5.0409210042.20090923@posting.google.com...
> Hi Silvan,
>
> I got the answer. please see the following message:
>
> Wednesday, December 04, 2002
>
> Neat. I may be slow to this, but I just discovered the Google
> Toolbar's anti-popup feature. It will deactivate the onUnload
> javascript function, which won't eliminate all pop-ups, but it will
> get those annoying ones that happen when you're trying to leave
> somewhere. (To get to the feature, click on the Google logo, go to
> Toolbar Options, and then Experimental Features. [screenshot]. There's
> some other interesting stuff there, too.)
>
> url:http://www.evhead.com/archives/2002_12_01_arch.asp
>
> the screenshot is in here: http://www.evhead.com/google_tb_exp.gif
>
> I turn off that function which is capturing popup window and it works.
>
> Cheers,
>
> Hsun-Cheng
>
>
>
> "Silvan Gehrig" <news@mcdark.ch> wrote in message
> news:<#jP72GynEHA.2764@TK2MSFTNGP11.phx.gbl>...
>> Hi Hsun-Cheng Hu
>>
>> Thanks for you answer. Yeah, the behaviour of your problems
>> are really the same. But the workaround from microsoft would
>> not work in my case because the script is generated dynamically.
>> Thus I cannot register the event in the body tag... badly...
>>
>> I don't know what's the reason about this problem, may be
>> that an installed software makes problems... I have so many
>> software packages installed, I won't to check it out. ...or you
>> may ask Bill, but I think he wont respond ;-)
>>
>> >posted in MS website is to add the onunload property in <Body> tag.
>> Okay, it is a browser bug, I'm really happy to hear that. Would
>> you like to tell me the "Q" number of the article please?
>>
>> Cheers & Thx
>>
>> Silvan
>>
>>
>> "Hsun-Cheng Hu ­J°V¸Û" <hucheng@ms2.url.com.tw> schrieb im Newsbeitrag
>> news:39db34a5.0409200635.455d9b0f@posting.google.com...
>> > Hi, Silvan
>> >
>> > I also have the same problem recently...
>> > The story is: I install my program by installsheild, that program is
>> > developed by BCB . And then, I find out the onunload of IE doesn't
>> > work.
>> > I have done some test today:
>> >
>> > First, I write an example html which just has <body
>> > onload="alert('load');" onunload="alert('unload');">. It's very simpe.
>> > In this case, whatever I do it doesn't give me the unload message.
>> >
>> > Then, I go to google to find something out. I find a bug that IE had
>> > it before. The bug is IE doesn't fire onload event. And the solution
>> > posted in MS website is to add the onunload property in <Body> tag.
>> > So, I do the following test:
>> >
>> > I modified the <Body> tag to:<body onload="alert('load');"
>> > onbeforeunload="" onunload="alert('unload');">. And Then
>> > It works everything...
>> > I close the window, IE alert "unload".
>> > I press reload, IE alert "unload".
>> > I navigate another url, IE alert "unload".
>> > .......
>> > Everything was fine at moment.
>> >
>> > But anyway, I DO really want to know what IE happens. Does my programm
>> > install something conflicting with IE?
>> >
>> > The following are components which may have relation with IE and are
>> > installed with my program:
>> >
>> > bcbie60.bpi
>> > nmfast60.bpi
>> > indy60.bpi
>> >
>> >
>> > Thanks
>> >
>> > Hsun-Cheng Hu
>> >
>> >
>> > "Silvan Gehrig" <news@mcdark.ch> wrote in message
>> news:<OBrixcInEHA.3392@TK2MSFTNGP15.phx.gbl>...
>> > > At least, I've found out...
>> > >
>> > > The onunload event seems to have a bug.
>> > > I've tried onbeforeunload which works fine :-)
>> > >
>> > >
>> > >
>> > > "Silvan Gehrig" <news@mcdark.ch> schrieb im Newsbeitrag
>> > > news:%231ECnMDnEHA.3392@TK2MSFTNGP15.phx.gbl...
>> > > > Hi @ll
>> > > >
>> > > > I'm getting some trubles using the follwing lines of codes:
>> > > >
>> > > > function OnWindowUnload()
>> > > > {
>> > > > debugger;
>> > > > }
>> > > > window.onunload = OnWindowUnload;
>> > > >
>> > > > IE calls the window.onunload event when I run this code
>> > > > on my local machine (http://localhost/index.html). But IE does
>> > > > NOT fire the onunload event when I call the same code above
>> > > > on the same machine, with the same browser (and security settings)
>> > > > but using the machine name (http://MyPCName/index.html).
>> > > >
>> > > > Do you know anything about this problem? Is that a known IE bug?
>> > > >
>> > > > Thx & cheers
>> > > >
>> > > > Silvan
>> > > >
>> > > >



Relevant Pages

  • Re: window.onunload with ie 6.0 (XP SP1)
    ... I may be slow to this, but I just discovered the Google ... Toolbar's anti-popup feature. ... javascript function, which won't eliminate all pop-ups, but it will ... > Okay, it is a browser bug, I'm really happy to hear that. ...
    (microsoft.public.scripting.jscript)
  • Re: how to catch invalid email in form
    ... >> I tried to look on google but did not find a method of testing a string to ... > An old Javascript function I found on Google (this is a common question, ... Javascript for validation. ...
    (alt.php)
  • Re: JavaScript and C#
    ... How can I make the javascript function all a procedure ... You may want to look at Ajax which uses the Code Behind file as a proxy from the client side. ... There should be lots of articles about Ajax out on Google or Dogpile.com ...
    (microsoft.public.dotnet.languages.csharp)