/    Sign up×
Community /Pin to ProfileBookmark

Need Help! Pop-Up on exit, how to

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

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@XeenslayerDec 18.2002 — <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).
Copy linkTweet thisAlerts:
@bhatijayauthorDec 18.2002 — Thanks Xeenslayer!
×

Success!

Help @bhatijay spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...