Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Apr 2003
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    window trouble...

    is it possible to check to see if a window is already open... how would i do that... thanx in advance...

  • #2
    Regular Coder
    Join Date
    Mar 2003
    Posts
    176
    Thanks
    0
    Thanked 0 Times in 0 Posts
    like this perhaps:
    Code:
    <html>
    <head>
    <title>Check Popup</title>
    <script type="text/jav&#97;script" language="jav&#97;script">
    <!--;
    var pop=null
    function checkPopup(){
    	if(!pop || pop.closed){
        	alert("Popup closed");
        	pop=window.open('','','width=200,height=200');
    	}else{
        	alert("Popup is open");
              pop.focus();
    	}                    
    }
    //-->
    </script>
    </head>
    <body>
    <a href="jav&#97;script: void checkPopup()">isOpen?</a>
    </body>
    </html>

  • #3
    New to the CF scene
    Join Date
    Apr 2003
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    gracias amigo!

  • #4
    New to the CF scene
    Join Date
    Apr 2003
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok... turns out still need need help... i have two functions... one to check if the window is open... if its closed, it opens it and if its open it just changes the properties... not sure whats wrong... ive attached the js file...

    thanks,
    scott
    Attached Files Attached Files


  •  

    Posting Permissions

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