/    Sign up×
Community /Pin to ProfileBookmark

Pop Up window when main window is close

I need a script or code for popup a window when somebody close the window of my page or change url, is there something i can use??

to post a comment
HTML

2 Comments(s)

Copy linkTweet thisAlerts:
@ZeinFeb 17.2007 — hi Nikolas

You can use the onbeforeunload event and display whatever you want and it's work on IE and firefox
Copy linkTweet thisAlerts:
@grumpyoldtechsFeb 17.2007 — i hope you want to put this to good use and not use it to annoy people with adverts when they click close.
×

Success!

Help @nikolas22t 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 5.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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...