Pseudo: onWindowClose => openNewWindow (Javascript)

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

Pseudo: onWindowClose => openNewWindow (Javascript)

Post by malcolmboston »

simple question: how?

ive seen it employed on http://www.hsbc.co.uk in the online banking section, you close browser, up pops a window saying "Please wait...logging you out, and then it closes within 3 seconds, ive seen some examples which could work but no actual examples of what i want to do

have you achieved this? if so, how? or do you have some implementation idea's

fyi its for a chat site, if a user closes the window, up pops a window and it logs them out automatically, i know JS can be disabled but i already have a catcher for that
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

hm... onunload event?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

No longer works by default in Firefox or browsers with popup blockers however. There were too many people abusing it to throw uncontrollable amounts of advertisements at the screen during the 90's :(
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

Post by malcolmboston »

anyway of getting around it like most serious pop-up suppliers do?

like i said, its for genuine reasons
Post Reply