JavaScript 411
=Generating Windows=

Opening and closing a window
Use this form to modify the Options for a new window. Everything works (I think) except every other click on 'Open New Window' fails to work if a window is already open. (IOW make sure you use the 'Close New Window' button unless your helping me debug). Try it a few times and then look at my code. I've provided some notes below.

If you want to see the exact Javascript that was used to open your customized window, click the 'How did I do that?' button.

Toolbar
Location
Directories
Status
Menubar
Scrollbars
Resizable
Copyhistory
Width =
Height =
Full URL =

CODE NOTES:
You may have to take a look at my full source to get the scope of these objects.

function doClose() {
 //   This is broken.
 //   It always works when called from CLOSE BUTTON,
 //   but only every other call from checkOpen() will close the window!?!?
 //   checkOpen() gets this far, but the next line doesn't work.
 //   I tried to call this.myRealWin.close() twice but didn't change effect

 this.myRealWin.close()

 //this.myRealWin.close()
 //
 //Tried to test for existance of open window with the following but it will
 //never be null because its been created as an object in my SCRIPT.
 //How could I modify this to work??
 //I'm using myWin.created as a flag (1=open/0=closed), but it doesn't really 
 //test for window existance.
 //NOTE: if the user closes the window using their GUI instead of the close
 //button, the this.created will be WRONG!
 //
 if (this.myRealWin == null)
  alert('The window was successfully closed.\nClick to continue. . .')
 this.created = 0
}
Send comments to Andy Augustine

Return to the JavaScript 411 main menu

Visitor #910
© 1996 Frequency Graphics