It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

onbeforeunload: close vs. back button

onbeforeunload: close vs. back button

Postby Morphos on Tue Feb 09, 2010 10:28 am

Hi,
I have the following problem:
When I use this script it pops up both if a user tries to close the window and also if he presses the back button. Please tell how to show another window or do another action when the back button is pressed? I know it is possible although a lot of people say it's not.
Code: Select all
<script type="text/javascript" type="text/javascript">
window.onbeforeunload = confirmExit;
  function confirmExit()
  {
    return "blabla";
  }
</script>

Thank you very much in advance.
Morphos
 
Posts: 1
Joined: Tue Feb 09, 2010 10:26 am

Who is online

Users browsing this forum: No registered users and 2 guests