Evertjan. said the following on 4/17/2007 3:58 AM:
Randy Webb wrote on 17 apr 2007 in comp.lang.javascript:
>buhailiang said the following on 4/16/2007 10:22 PM:
>>I've a 'TEST' link on page, which has href='javascript: void(0)', and
a big iframe page.
When I load the page, window.onload event is triggered after the big
iframe page loaded,
If I click the 'TEST' link before the window.onload execute, the
window.onload will never execute in IE 6.0.
Yet another reason not to use a javascript: URL
<URL:http://jibbering.com/faq/index.html#FAQ4_24>
Right you are, Randy, but what is the problem of the OP?
The problem of the OP is that they are clicking on a link before the
page has finished loading so the onload event never fires. It will do
that with *any* link if there is nothing in the link to tell the browser
not to navigate. The only reason the OP is seeing the behavior and
doesn't see it with a "normal" link is that a normal link causes the
browser to navigate away so you don't realize the onload event never fired.
If he/she does not like the behavour, why put in that link?
Precisely.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ -
http://jibbering.com/faq/index.html
Javascript Best Practices -
http://www.JavascriptToolbox.com/bestpractices/