Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: New window opens to a custom size

  1. #1
    Join Date
    Sep 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default New window opens to a custom size

    Hi everyone, first time on this forum, hope you guys can help me out. I'm new to scripting, my question is, when i click a link, I would like the link to open in a new window with my desired size, which would be 800 X 600 pixels, how can i do this? Can someone direct me to a tutorial? I've searched sites and this forum but found nothing. I hope i'm posting this in the right section.

    thanks
    mike

  2. #2
    Join Date
    Sep 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

  3. #3
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Code:
    <a href="#" onclick="window.open('http://www.google.ca/','newWin','width=800,height=600')">Google.ca</a>
    - Mike

  4. #4
    Join Date
    Sep 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thankyou very very much mike!


    mike

  5. #5
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by mburt
    'width=800,height=600'
    You've omitted the resizable and scrollbars features, which should always be present.

    Code:
    'width=800,height=600,resizable,scrollbars'
    Ideally though, the OP would forego a new window entirely.

    Mike

  6. #6
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Yes, I realize that the scrollbars would be omitted. Actually, any parameters that it has will automically be null if not defined.
    - Mike

  7. #7
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by mburt
    ... any parameters that it has will automically be null if not defined.
    There are some exceptions, but yes, in general, an omitted boolean feature will be considered 'false'. However, that's my point: neither scrollbars nor resizable should ever be omitted. If the window size is misjudged (and that can always happen), then the user will either need to scroll or resize the window to view the clipped content.

    Mike

  8. #8
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    I agree completely
    - Mike

  9. #9
    Join Date
    Sep 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ok kewl, i'll try both

  10. #10
    Join Date
    Sep 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi, i tried the script, it works, but the original redirects to a page that says NOT FOUND...

    here
    http://www.pixel1studios.com/

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
  •