View Full Version : Problem with minimized dhtml-windows

08-21-2007, 03:12 AM
1) Script Title: dhtml window widget (v. 1.03)

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

3) Describe problem:

I am using three windows on my page and I want them to start minimized. I use the following;

dhtmlwindow.minimize(win1.getElementsByTagName("img")[0], win1)

However, it only works with one window. If I use it on the other two, they start minimized and stacked down in the corner, but when the page finished loading they return to the position (still minimized) given in var win1 = dhtml.open(). I would like for all windows to start down in the corner minimized, then when clicked return to the position specified.

08-21-2007, 05:17 AM
It does work with more than 1 DHTML window, the problem is due to the "recal" parameter that you must have defined when opening each window. Because of its presence, the window is repositioned again when the document fully loads, causing the window to move from the minimized location on the page back to the original.

There are a couple of ways to solve this. Either remove the "recal" parameter when calling dhtmlwindow.open(), or, minimize the windows after the page has loaded, via something like:

dhtmlwindow.minimize(inlinewin.getElementsByTagName("img")[0], inlinewin)
dhtmlwindow.minimize(googlewin.getElementsByTagName("img")[0], googlewin)

p.s: Please format code in your posts with the CODE tag. :)