onunload in <Body> Not working

Please look at the simple html below:<br />
The function defined in the onunload will not do the alert on my IE Exp. Browser, but will work on another PC's IE Exp. Browser.<br />
<br />
How can this be. <br />
<br />
any help would be appreciated.<br />
Thanks<br />
Clyde <br />
<br />
<html><br />
<head><br />
<Script language="javascript"><br />
function testun()<br />
{<br />
alert("Test UN Found");<br />
}<br />
</Script><br />
</head><br />
<body onunload="testun()"><br />
<form><br />
Test Unload<br />
</FORM><br />
</body><br />
</html><!--content-->I'm running IE 6 on XP and using that code, it doesn't work when I close the window, but if you create a link on the page, and click the link, you will get the pop-up.<br />
<br />
I'm not sure if that helps, but if you're looking for a pop-up when the user closes the window, I'm sorry, but I can't help there... but I'm sure someone else will!!<!--content-->Thanks for your reply.<br />
<br />
At first I thought I was crazy, so I tried the simplest HTML I could find and tried it on my PC and The PC in the next office,<br />
The Alert inf the onunlod function does not work on my PC but works on the PC in the other office.<br />
<br />
I do not know of any settings in IE Exp. that could prevent this.<br />
<br />
If you Think of any thing get back to me<br />
<br />
Clyde<!--content-->This was cross-posted (<!-- m --><a class="postlink" href="http://forums.webdeveloper.com/showthread.php?s=&threadid=32079">http://forums.webdeveloper.com/showthre ... adid=32079</a><!-- m -->) in the JavaScript section, just so anyone viewing this thread knows. As for the original poster, please refrain from cross-posting in the future.<!--content-->
 
Back
Top