SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict gthorley's Avatar
    Join Date
    Oct 2000
    Location
    Canada
    Posts
    392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am creating a pop up window and using the following code

    <!--
    function win(fileName) {
    myFloater = window.open('','myWindow','scrollbars=no,status=no,width=525,height=500')
    myFloater.location.href = fileName;
    }
    //-->

    When called it defaults to a position on the left of the screen and in NS4.7 the top starts just in the middle of the bottom toolbar (personal toolbar) with IE5 it starts about 1/3 down which is to low .

    Can someone tell me how to amend the above which will work in all browsers regardless of resolution that will place it 50 pixels from the actual top of the screen and 50 pixels from the right edge?

    I have tried using the following amendment but it only gives proper results in IE5. In Netscape the top is 1/3 down the page and the bottom of the pop up is cut off

    <!--
    function win(fileName) {
    myFloater = window.open('','myWindow','scrollbars=no,status=no,width=525,height=500,screenx=15,screeny=250,top=15,left=250')
    myFloater.location.href = fileName;
    }
    //-->

  2. #2
    The Hiding One lynlimz's Avatar
    Join Date
    Jul 2000
    Location
    Singapore
    Posts
    2,103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could you show us an Example?
    "Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
    -- Albert Einstein

  3. #3
    SitePoint Addict gthorley's Avatar
    Join Date
    Oct 2000
    Location
    Canada
    Posts
    392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the interest Linlimz

    I think I have solved the problem but not sure why the original doesn't work as I was under the impression NS4 and above used screenx and screeny.

    But by just using just IE5 left and top it works. for those interested the following are test views

    http://www.artbyjudy.com/popuptest/good_test.html - Works in both NS4.7 and IE5 not sure about any other browsers so if someone finds it doesn't work properly please advise browser.

    http://www.artbyjudy.com/popuptest/bad_test.html - Works okay in IE5 but not in Netscape


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
  •