Hello,
the example code is the following(the number in parentheses at the
beginning are just for reference)(The complete HTML file is at the end
of this article):
(1)window.locat ion = 'http://www.google.com' ;
(2)alert("I'm still here!");
(3)window.open( "http://www.slashdot.co m", "_blank");
What happens, is that after the assignment (1) theoretically the rest
of the code shouldn't execute, since the window should be loading a
new URL. But in my browser(Firefox 1.0 on GNU/Linux) the browser also
executes (2) and (3).
It seems that the window is only loaded with the new content after the
script has finished executing.
So is this behaviour wrong or correct?
In all documentations I searched there is no mention of WHEN the new
location should be loaded, if immediately or only after the script
finished executing.
Can anyone try this with IE?
Thank you
Roland
Complete file:
<html:html>
<head>
<script type="text/javascript">
window.location = 'http://www.google.com' ;
alert("I'm still here!");
window.open("ht tp://www.slashdot.co m", "_blank");
</script>
</head>
<body>
Test.
</body>
</html:html>
the example code is the following(the number in parentheses at the
beginning are just for reference)(The complete HTML file is at the end
of this article):
(1)window.locat ion = 'http://www.google.com' ;
(2)alert("I'm still here!");
(3)window.open( "http://www.slashdot.co m", "_blank");
What happens, is that after the assignment (1) theoretically the rest
of the code shouldn't execute, since the window should be loading a
new URL. But in my browser(Firefox 1.0 on GNU/Linux) the browser also
executes (2) and (3).
It seems that the window is only loaded with the new content after the
script has finished executing.
So is this behaviour wrong or correct?
In all documentations I searched there is no mention of WHEN the new
location should be loaded, if immediately or only after the script
finished executing.
Can anyone try this with IE?
Thank you
Roland
Complete file:
<html:html>
<head>
<script type="text/javascript">
window.location = 'http://www.google.com' ;
alert("I'm still here!");
window.open("ht tp://www.slashdot.co m", "_blank");
</script>
</head>
<body>
Test.
</body>
</html:html>
Comment