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

  • SEARCH
  • Home
  • 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 6331957
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:10:12+00:00 2026-05-24T18:10:12+00:00

function CloseWindow() { window.close(); } The above code is working fine for IE but

  • 0
  function CloseWindow()
  {
        window.close();
  }

The above code is working fine for IE but Firefox does not allows to close browsers window
any solution???

  • 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-24T18:10:13+00:00Added an answer on May 24, 2026 at 6:10 pm

    similar post answer

    function closeWindow() {
        netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserWrite");
        alert("This will close the window");
        window.open('','_self');
        window.close();
    }
    
    closeWindow();
    

    reason
    For security reasons, your script cannot close a window/tab that it did not open.

    The solution is to present the age prompt at an earlier point in the navigation history. Then, you can choose to allow them to enter your site or not based on their input.

    Instead of closing the page that presents the prompt, you can simply say, “Sorry”, or perhaps redirect the user to their homepage.

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

Sidebar

Related Questions

The function window.opener.location.reload(); is working fine with IE but not refreshing parent page in
I can't get this working. Here's my code. <script type=text/javascript> function close() { window.opener.location.reload();
function getWriters(cat, lev, id) { if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome,
In Firefox I suddenly got this message from firebug: $('a.close, #fade').live is not a
i'm trying to close the browser window with the ESC key, but dont know
Im using this code to refresh the parent window and close the popup window..Is
I have the following code in a file called overlay.js: Event.observe(window, 'load', function() {
I am calling the javascript window.open() function to load another url in a pop
How to close a tab or window by clicking on a button in JQuery?
I am displaying a warning message if user try to close window without saving

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.