Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6991609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:31:32+00:00 2026-05-27T19:31:32+00:00

I am trying to put some custom text on the popup that asks for

  • 0

I am trying to put some custom text on the popup that asks for leave page or stay on the page.
I tried this

window.onbeforeunload = function () {
             return "This is my custom message";
         };

But Mozilla and Chrome still says their own messages while IE shows my message.
So what I am trying to do is it should show my custom message with Leave and Stay buttons.
And I am sure I have seen in some webiste although I don’t remember which website 🙁

Is it possible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T19:31:33+00:00Added an answer on May 27, 2026 at 7:31 pm

    Firefox 4 and higher will not show your custom message. See also this answer:

    From MDN:

    Note that in Firefox 4 and later the returned string is not displayed to the user. See Bug 588292.

    This "Bug" is actually a (imho questionable) feature.. so there’s no way to display the message in Firefox 4. If you think it should be changed, comment on that bug so the Firefox developers will know that people actually want to be able to show a custom string.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to make scrollable RelativeLayout, that contains some custom Views. This is the
I am trying to put some distributed caching into play, I'm using this indeXus.Net
I've been trying to overload JMenu and put in some custom code to support
I'm trying to put in an exception in my web.config so that one page
I'm trying to make a custom report. I've just put some test code on
I'm trying to put some specs around a new rails 3 project I am
I'm trying to put some sites i crawled into a shelve, but the shelve
I'm trying to write a small wsgi application which will put some objects to
I am trying to create a 5x5 grid with 2 exits and put some
I'm trying to generate some code at runtime where I put in some boiler-plate

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.