Firefox 7: custom exit confimation message not working

Discussion in 'JavaScript' started by Hipto, Oct 3, 2011.

  1. #1
    Hey guys these code below works on chrome and IE and the older version of FF. But not working on the latest (firefox is showing their own alert instead)....can something be done?

    <script language="JavaScript">
    var allowConfirm = true;
      window.onbeforeunload = confirmExit;
      function confirmExit()
      {
    	  if(allowConfirm)
        return "You're about to be redirected"+ '\n'+ "IF this is UNIntentional --- Kindly click [CANCEL]/[Stay on Page]";
    	 else
            allowConfirm = true;
      }
    </script>
    Code (markup):
     
    Last edited: Oct 3, 2011
    Hipto, Oct 3, 2011 IP
  2. Sky AK47

    Sky AK47 Member

    Messages:
    298
    Likes Received:
    8
    Best Answers:
    1
    Trophy Points:
    45
    #2
    Sky AK47, Oct 3, 2011 IP
  3. Hipto

    Hipto Peon

    Messages:
    939
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Is there any workaround? or will they change it in the future??
     
    Hipto, Oct 3, 2011 IP
  4. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #4
    Uh. This was fixed last August. Look elsewhere.
     
    drhowarddrfine, Oct 3, 2011 IP
  5. Hipto

    Hipto Peon

    Messages:
    939
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    sorry I don't understand :s
     
    Hipto, Oct 4, 2011 IP