Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
| Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old May 12th, 2006, 02:00 AM
Friend of Wrox
Join Date: Dec 2004
Location: Chennai, Tamil nadu, India.
Posts: 307
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Vadivel Send a message via Yahoo to Vadivel
Default How to open a popup when back button is pressed

Hi All,

In many sites i have seen popup windows opening up when we click on IE back/forward/close buttons. I am wondering how to do that.

As long as the user is going to use the keyboard we can trap the window.event.keyCode. But what would we do if the user uses his mouse and clicks on the back/forward/refresh buttons?

Any pointers regarding this would be real help to me.

Best Regards
Best Regards

  #2 (permalink)  
Old May 12th, 2006, 03:08 AM
Friend of Wrox
Join Date: May 2004
Location: , , .
Posts: 212
Thanks: 0
Thanked 0 Times in 0 Posts

Hi Vadivel

I think it would be alot easier for you just to use the onunload event. There's probably something out there if you want to use the browser's history, but that could be tricky if the user has caching and history turned off. Have a look at this example:


Hope this helps

Similar Threads
Thread Thread Starter Forum Replies Last Post
Open new popup Dj Kat Javascript How-To 1 December 23rd, 2005 07:19 AM
Back button pressed -Urgent mikedeepak Javascript 2 September 29th, 2005 12:07 AM
"Pressed button" selector with onload refresh marcioschilling Javascript How-To 0 May 31st, 2005 01:37 PM
Executing a file when button pressed scoobie Pro PHP 1 May 10th, 2005 05:35 AM
history.back or hitting the back button won't work lian_a Classic ASP Basics 4 July 29th, 2004 12:14 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.