You could just call hide() immediately after opening a DHTML window to hide it, such as:
Code:
var googlewin=dhtmlwindow.open("googlebox", "iframe", "http://images.google.com/", "#1: Google Web site", "width=590px,height=350px,resize=1,scrolling=1,center=1")
googlewin.hide()
If if you want the DHTML window to be "truly" hidden from the get go until show() is called, you'll need to modify inside dhtmlwindow.js the line in red:
Code:
t.isResize(getValue("resize")) //Set whether window is resizable
t.isScrolling(getValue("scrolling")) //Set whether window should contain scrollbars
t.style.visibility="visible"
t.style.display="block"
Change "block" to "none".
Also, can the page (window) tell when it is being shown again?
Well, one way is just to test whether the DHTML window's "display" property is set to "block". If so, it means it's shown. So for example:
Code:
var googlewin=dhtmlwindow.open("googlebox", "iframe", "http://images.google.com/", "#1: Google Web site", "width=590px,height=350px,resize=1,scrolling=1,center=1")
googlewin.show()
alert(googlewin.style.display) //"none"
googlewin.hide()
alert(googlewin.style.display) //"block"
Bookmarks