[thelist] Frames, Javascript and IE 5.5 continued....

Peter-Paul Koch gassinaumasis at hotmail.com
Mon Jul 23 13:09:22 CDT 2001



>:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>: 2) IE 5.0 does NOT support location = 'newpage.html'
>:    or location.href = 'newpage.html' !!!
>:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>garbage.  ie5.0 supports both just fine.  in your example you have four
>links.  the first two (which load a new document into the bottom frame
>"down") work just fine in ie5.0.  the bottom two (which load a new document 
>into the top frame "up") do not work at all.  however, that's not the fault 
>of the browser.  they don't work because the href attribute contains a hash 
>which gets executed after the onclick, overriding the request to change 
>document location.  try adding a return false to your onclick event 
>handlers and you'll see all four links work as expected.

Interesting... I've added return false, but I can't test it since I don't 
have IE5.0 at home.

However, this seems to be a specific IE behaviour that I've noted before. 
The onClick is executed before the actual href, and what I'd think is that 
the execution of location.href would remove the page from the window, 
cancelling the href. However, it doesn't. I noted the same behaviour in 
another context (forms and submit()? something like that) and it seems that 
Netscape does indeed cancel the href because the page is gone, but Explorer 
doesn't.

Still the question remains why IE5.5 does not do the same as 5.0 . It lets 
the location.href cancel the A HREF.

More research is clearly necessary.

ppk


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp





More information about the thelist mailing list