Results 1 to 7 of 7

Thread: Firefox 7: custom exit confimation message not working

  1. #1
    Join Date
    Oct 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Firefox 7: custom exit confimation message not working

    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?

    Code:
    <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>

  2. #2
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    I'm on Firefox 7 and it works fine.
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  3. #3
    Join Date
    Oct 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by rangana View Post
    I'm on Firefox 7 and it works fine.
    can you show me your test page? or can you make a screenshot?

  4. #4
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    Attached
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  5. #5
    Join Date
    Oct 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by rangana View Post
    Attached
    lol. That's the reason for me to be posting here. That's their DEFAULT message not my customize message. Did you read the code bro

  6. #6
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    My apologies if I missed your point but there's no good in you being sarcastic when you're asking for assistance.

    Anyway, please read the specs. It's mentioned there:
    https://developer.mozilla.org/en/DOM...onbeforeunload

    Note that in Firefox 4 and later the returned string is not displayed to the user. See Bug 588292.
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  7. #7
    Join Date
    Oct 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I'm not being sarcastic lol Thanks anyway rangana
    so there's no workaround?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •