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?

144 of 267 people (54%) answered Yes
Recently 3 of 10 people (30%) answered Yes

Entry

How to catch the "back button" event from/with HTML or JavaScript, so I can navigate the user to another page (not to the last in history)?

Apr 4th, 2008 20:00
ha mo, Alex Fenton, Daniel Amsler, http://developer.irt.org/script/311.htm


There isn't a specific event in any of the browsers for clicking the
Back button; there's only the generic onunload event which fires when
any action is taken which loads a new page into the browser window -
including clicking the back button. However, there's no way of seeing
_where_ the browser is going to next.
There's a number of techniques in the IRT link given which might be
helpful. If you're concerned about users going back to out-of-date
dynamically generated pages, take a look at using
to load each page in.
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