faqts : Computers : Programming : Languages : JavaScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

39 of 58 people (67%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

In onbeforeunload(), can I find out what page the user is navigating to (if any)?

Apr 4th, 2008 20:52
ha mo, Thor Larholm, Mike Ross,


The onbeforeunload event reveals nothing about where the user is 
navigating, due to obvious security reasons.
If you want to know where the user is navigating, consider using the 
WebBrowser or the InternetExplorer ActiveX control. They have a 
BeforeNavigate2 event that will let you determine this.
Onbeforeunload event:
http://msdn.microsoft.com/workshop/author/dhtml/reference/events/onbefor
eunload.asp
InternetExplorer object:
http://msdn.microsoft.com/workshop/browser/webbrowser/reference/Objects/
InternetExplorer.asp
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com