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 8882581
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:36:55+00:00 2026-06-14T20:36:55+00:00

I am using the following javascript to open another window and I want to

  • 0

I am using the following javascript to open another window and I want to check if that window is actually open, but then I want it to call a “pause()” function if the window is not open. I have no clue how to do this even after 3 days of researching, can anybody guide me with this?

The javascript to open the window:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.js"></script>
    <script type="text/javascript">
        var windowSizeArray = ["width=300,height=300",
                                "width=200,height=400,scrollbars=yes"];

        $(document).ready(function () {
            $('#newWindow').click();
            window.open($('#newWindow').attr('href'), 'window name', 'window settings')
            $('.newWindow').click(function (event) {

                var url = $(this).attr("href");
                var windowName = "popUp"; //$(this).attr("name");
                var windowSize = windowSizeArray[$(this).attr("rel")];

                window.open(url, windowName, windowSize);

                event.preventDefault();

            });
        });


    </script>

If that window is not open I want it to call a pause function:

<a href="javascript:void(0);" onclick="pause();"><img name="b1" src="system/modules/surf/stop.png" border="0" alt="Pause" title="Pause" style="position:absolute;top:28px;margin-left:5px"></a>
  • 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-06-14T20:36:56+00:00Added an answer on June 14, 2026 at 8:36 pm

    The function window.open() returns a handle to your newly created window, which has a closed property. This property is true if the new window has been closed:

    var popuphandle=window.open(...);
    alert(popuphandle.closed);
    

    If you need to monitor the status of the window continuously, use window.setInterval():

    window.setInterval(function()
    {
        if (popuphandle.closed) pause();
    }, 1000);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following JavaScript I am using to save selected check boxes: function
I am using the following JS function to open a pop-up window to display
I have the following Javascript code (using jQuery): floatUpAndDown(); function floatUpAndDown() { $(#bird).animate({top: '+=30px'},
I am using the following javascript to slide open panels to the right when
I am using the following javascript to slide open panels to the right when
I want to print a dive content using javascript and jquery and using following
I am using following JavaScript/Ajax to read page content, This script works great but
I am uploading HTML5 canvas base64 image over servlet using following JavaScript code function
I'm using the following javascript code to display xml/xsl: function loadXMLDoc(fname) { var xmlDoc;
I'm using the following javascript in a bookmarklet but it keeps on adding the

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.