Results 1 to 2 of 2

Thread: DHTML Modal Window 100% height

  1. #1
    Join Date
    Jan 2009
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile DHTML Modal Window 100% height

    1) Script Title: DHTML Modal window v1.1

    2) Script URL (on DD): DHTML Modal Window

    3) Describe problem: I would like to open an external link (http://www.mylink.com) in a modal window centered and at 100% of the screen height. Is this possible with this script. If yes, can someone post an example of the onclick coding.

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

    Default

    Well, you can call dhtmlwindow.setSize(w, h), and for the h parameter, use dhtmlmodal.docheightcomplete to get the height of the viewable screen. However, you must also account for the chrome area of the DHTML window, so taking that into account, it might look something like:

    Code:
    var agreewin=dhtmlmodal.open("agreebox", "iframe", "modalfiles/agreement.htm", "This Page's Terms of service", "width=590px,height=100%,center=1,resize=1,scrolling=0", "recal")
    
    agreewin.setSize(700, dhtmlmodal.docheightcomplete-50)
    50 is just an estimate of the chrome's height.
    DD Admin

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
  •