/*
JavaScript Unleashed, Third Edition
by Richard Wagner and R. Allen Wyke
ISBN: 067231763X
Publisher Sams CopyRight 2000
*/
<html>
<head>
<title>Load/Unload Example</title>
<script language="JavaScript">
<!--
var noticeWindow
//onLoad event handler
function checkBrowser() {
if ((navigator.appName == 'Netscape') &&
(navigator.appVersion == '4.0 (Win95; I)')) {
noticeWindow = window.open("", "NoticeWindow",
"toolbar=0,width=300,height=100,resizable=0");
noticeWindow.document.write("<HEAD><TITLE>Upgrade Notice</TITLE></HEAD>"); noticeWindow.document.write("<CENTER><BIG><B>Your Web Browser needs to be updated. Please see your supervisor before noon.
</B></BIG></CENTER>")}
}
// onUnload event handler
function clean() {
if ( noticeWindow != null ) { noticeWindow.close() };
}
// -->
</script>
</head>
<body onLoad="checkBrowser()" onUnload="clean()">
<font color="#008000">
<center><big><b>Intranet Home Page</b></big></center>
</body>
</html>
|