Results 1 to 3 of 3

Thread: Help with mini window script

  1. #1
    Join Date
    Oct 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Help with mini window script

    How do i center the window?
    the link is http://dynamicdrive.com/dynamicindex8/dhtmlwindow.htm
    Last edited by aznkpballer; 10-23-2004 at 06:29 PM.

  2. #2
    Join Date
    Aug 2004
    Location
    Brighton
    Posts
    1,563
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Replace the following script function:

    Code:
    function loadwindow(url,width,height){
    if (!ie5&&!ns6)
    window.open(url,"","width=width,height=height,scrollbars=1")
    else{
    document.getElementById("dwindow").style.display=''
    document.getElementById("dwindow").style.width=initialwidth=width+"px"
    document.getElementById("dwindow").style.height=initialheight=height+"px"
    // Modified script starts here
    if (parseInt(navigator.appVersion)>3) {
     if (navigator.appName=="Netscape") {
      winW = window.innerWidth;
      winH = window.innerHeight;
     }
     if (navigator.appName.indexOf("Microsoft")!=-1) {
      winW = document.body.offsetWidth;
      winH = document.body.offsetHeight;
     }
    }
    document.getElementById("dwindow").style.left=(winW/2) - (width/2)
    document.getElementById("dwindow").style.top=(winH/2) - (height/2)
    // Modified script ends here
    document.getElementById("cframe").src=url
    }
    }

    cr3ative
    Last edited by cr3ative; 10-23-2004 at 06:54 PM.
    A retired member, drop me a line through my site if you'd like to find me!
    cr3ative media | read the stickies

  3. #3
    Join Date
    Oct 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks for your help

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
  •