Mega Code Archive

 
Categories / JavaScript Reference / Javascript Properties
 

IsOpen Example

<!--  Example revised from  The Web Programmer's Desk Reference by Lazaro Issi Cohen and Joseph Issi Cohen  ISBN: 1593270119 Publisher: No Starch Press 2004 -->      <html> <body> <script language="JavaScript"> function function1() {     var m = window.createPopup();     var n = m.document.body;     n.style.border="solid 2px black";     n.innerHTML = "<font face='verdana'>This is the pop-up window content</font>";     m.show(350, 270, 200, 50, document.body);     if (m.isOpen == true) {         setTimeout("function2()", 2000);     }  }  function function2() {     alert("The pop-up window is Open"); } </script> <input type="button" value="Open pop-up window" onclick="function1();"> </body> </html>