Click to See Complete Forum and Search --> : DHTML Popup Window


Earl
06-05-2003, 10:14 AM
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.

Jona
06-05-2003, 12:15 PM
Flash overlaps all objects on a Web page. Try setting the z-index higher on the DIV.

Jona

Earl
06-05-2003, 01:01 PM
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?

Jona
06-05-2003, 01:21 PM
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

Earl
06-05-2003, 03:15 PM
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.

Jona
06-05-2003, 03:39 PM
Then what is the point in even posting originally? If you're just going to use a popup?

Jona

Earl
06-06-2003, 08:26 AM
What? The script is a DHTML popup... How else would it be used?

Jona
06-06-2003, 01:09 PM
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