Click to See Complete Forum and Search --> : DHTML Popup Window
I'm using the DHTML popup window at http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow.htm
My question is, can a "Close Window" button be placed on the popup window?
It happens, when using this script with Flash, that at times the title bar (with closing buttons) will hide behind the presentation.
Flash overlaps all objects on a Web page. Try setting the z-index higher on the DIV.
Jona
This is what I have;
<div id="dwindow" style="position:absolute;background-color:#EBEBEB;cursor:hand;left:0px;top:0px;display:none" onMousedown="initializedrag(event)" onMouseup="stopdrag()" onSelectStart="return false">
<div align="right" style="background-color:navy"><img src="max.gif" id="maxname" onClick="maximize()"><img src="close.gif" onClick="closeit()"></div>
<div id="dwindowcontent" style="height:100%">
<iframe id="cframe" src="" width=100% height=100%></iframe>
</div>
</div>
And it is below the <object> tag, should I move it above?
What about a "Close" button, is it possible?
You don't need to move anything. Change the SRC of your IFrame to load a page inside of this DIV. Also, to close it, use <a href="defaultPage.htm" onClick="closeit();">Close</a>.
Jona
Change the SRC of your IFrame to load a page inside of this DIV.
What page would I load? The loaded page is called from a link.
Also, to close it, use <a href="defaultPage.htm" onClick="closeit();">Close</a>.
Unfortunately this does not work.
I like DHTML windows but I may have to resort back to regular JavaScript opened windows.
Then what is the point in even posting originally? If you're just going to use a popup?
Jona
What? The script is a DHTML popup... How else would it be used?
OK, look, the DHTML popup window is not a standard Javascript opened window. This "popup" opens an IFrame (http://www.w3.org/TR/html401/present/frames.html#edef-IFRAME). To open any file you want in it, you must use the IFrame element (already in the source code) and set it's source (SRC attribute) to the location of the file you want to open. And in that file, have a link that onClick="parent.closeit();" (and if that doesn't work onClick="closeit();").
Jona