PDA

View Full Version : Load window widget while hidden?



python1340
10-11-2007, 08:01 PM
1) Script Title:
DHTML Window Widget

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/

3) Describe problem:
Can you load the window while it's hidden? What happens is when you re-open the window to fill it with new content, the old content is there while the new content is loading. Pretty distracting.

Thanks in advance!

ddadmin
10-11-2007, 11:46 PM
I assume you're talking about when using the "iframe" option. You can directly access the iframe and change the URL it displays while the DHTML window itself is still hidden. To access the iframe created by a DHTML window instance, the code looks like this:


window.frames["_iframe-"+t.id].location.replace("http://myothersite.com")

where [icode]t.id[/icocde] is the ID of your DHTML window when you created it, for example:


var googlewin=dhtmlwindow.open("googlebox", "iframe", "http://images.google.com/", "#1: Google Web site", "width=590px,height=350px,resize=1,scrolling=1,center=1", "recal")

Then:


window.frames["_iframe-googlebox"].location.replace("http://myothersite.com")