MSIE v7 does not (in my hands) open a Modeless Dialog or trigger an onLoad event if there is a Javascript alert in the target page. The following fails in MSIE v7 but is OK in v6 (zip file of full source available if required).
Would appreciate others confirming this and discussing why this should be so.
index.htm (only javascript function shown here)
function openDialog(n) {
if (typeof(window.showModalDialog) == 'object') { /* Ensure of browser support */
var sURL = 'modeless.htm'; /* Set the URL */
var oWin = window.showModelessDialog(sURL); /* Create new modeless window */
}
else {
alert('"showModlessDialog" not supported!');
}
}
modeless.htm
<html>
<head>
<title>Modeless dialog</title>
</head>
<body bgcolor="#ff0000" text="#ffffff" onLoad="alert('Modeless is now loaded')">
<center>
<h1>Modeless</h1>
</center>
<script type="text/javascript" language="JavaScript">
/* If the next line is included, it prevents the onLoad event occurring in MSIE v7 */
alert('This alert stops the onLoad event in MSIE v7!');
</script>
</body>
</html>