I have a
statement followed by an
. The
should never be executed because the
statement should update the all the frames, so the alert should not be seen. Right? After I click OK on the alert, the frames ARE all updated. (I only tried this on IE 6).
Code:
top.location.href
Code:
alert
Code:
alert
Code:
top.location.href
Code:
html>
<head>
<title>top.location.href test</title>
</head>
<body>
<script type="text/javascript">
top.location.href="[URL unfurl="true"]http://www.collectiblesbycarole.com/";[/URL]
// Why isn't the location.href statement above executed immediately?
// The alert below should not be executed, but is.
alert("Why is this executed?");
</script>
</body>
</html>