Results 1 to 2 of 2

Thread: Problem with minimized dhtml-windows

  1. #1
    Join Date
    Aug 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Problem with minimized dhtml-windows

    1) Script Title: dhtml window widget (v. 1.03)

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...ndow/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.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    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:

    Code:
    window.onload=function(){
    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •