Click to See Complete Forum and Search --> : Need Help! Pop-Up on exit, how to


bhatijay
12-18-2002, 08:56 AM
Hi Everyone,

How do I do a pop-up window on exit? When a visitor leaves my main page I like to popup a window with another URL.

Thank you for youe help

BJ

Xeenslayer
12-18-2002, 09:10 AM
<html>

<head>

<title>Popup on exit</title>

<script language="JavaScript">
function exitpopup()
{
NewWindow=window.open("url.html", "window_name", "window attributes");
}
</script>

</head>

<body onUnLoad="exitpopup()">

<body>

</html>
___________________________

Basically you make use of the onUnLoad JS event handler to start the command. The command is to open a new window (pop up window).

bhatijay
12-18-2002, 09:31 AM
Thanks Xeenslayer!