Results 1 to 5 of 5

Thread: dhtml windows help please

  1. #1
    Join Date
    Mar 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default dhtml windows help please

    Re: http://www.dynamicdrive.com/dynamici...htmlwindow.htm

    I'm trying to place the window further down from the top on the browser screen.

    Is there a way to set top position in the script? I can't find it, or don't know.

    I thank anyone in advance, who may be able to help me.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Here is where in the script that the window is initialized:

    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"
    document.getElementById("dwindow").style.left="30px"
    document.getElementById("dwindow").style.top=ns6? window.pageYOffset*1+30+"px" : iecompattest().scrollTop*1+30+"px"
    document.getElementById("cframe").src=url
    }
    }
    The two red 30's control how many pixels from the top that the window first appears. The first one is for virtually all browsers except IE, the second one's mainly for IE.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Mar 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    What is they say?
    Ask and you shall receive. John, your a Saint.

    One more question.
    Anyway to remove the bar and icon from the top of the window?
    And I guess I use false, so they can't drag.


    Again thank you very much John.

    dgm

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I'm not sure what you mean by icon. The bar and control images can be removed by removing this from the HTML portion:

    HTML Code:
    <div align="right" style="background-color:navy"><img src="max.gif" id="maxname" onClick="maximize()"><img src="close.gif" onClick="closeit()"></div>
    But, then it will be hard to close unless that is what you want.

    For no dragging, get rid of these as well:

    Code:
    onMousedown="initializedrag(event)" onMouseup="stopdrag()" onSelectStart="return false"
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Mar 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    That is exactly what I needed to know.

    Thank you very much.

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
  •