Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6

Thread: Pop Up Windows

  1. #1
    New to the CF scene
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post Pop Up Windows

    Hi,

    I've created a pop up for our website, but on some computers it shows up too large for the screen, and on mine it shows up perfectly...

    Is there a code that can resize the pop up according to the computer it's being viewed on, so that everyone sees the same thing and doesn't get upset with me for those "annoying pop ups"

    Thanks.

  • #2
    Regular Coder
    Join Date
    Sep 2002
    Location
    Louisiana
    Posts
    576
    Thanks
    0
    Thanked 0 Times in 0 Posts
    how are you calling the popup, it looks different probably because of resolution, in javascript:
    Code:
    function test() {
    win = window.open("test.html","hi","toolbars");
    width=screen.width;
    height=screen.width;
    win.resizeTo(width,height);
    }

  • #3
    New to the CF scene
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    function openpopup(){
    var popurl="popup.htm"
    winpops=window.open(popurl,"","width=599; height=599; scrollbars,resizable,")
    }

    openpopup()
    Last edited by Rhiannon; 01-10-2003 at 01:09 AM.

  • #4
    Regular Coder
    Join Date
    Sep 2002
    Location
    Louisiana
    Posts
    576
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    function test() {
    win = window.open("test.html","hi","toolbars");
    width=screen.width/3;
    height=screen.width/3;
    win.resizeTo(width,height);
    }
    test();
    that should resize the window to 1/3 of the users screen size. try it.

  • #5
    Regular Coder
    Join Date
    Jun 2002
    Location
    United Kingdom Confused: Often
    Posts
    859
    Thanks
    0
    Thanked 0 Times in 0 Posts
    599px is too big to be opening a window at, considering that just under 50% of visitors will be using 800x600...
    redhead

  • #6
    New to the CF scene
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks. That worked perfectly!


  •  

    Posting Permissions

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