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

Thread: Specified web page size

  1. #1
    Join Date
    Aug 2005
    Posts
    200
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Specified web page size

    How do I make a page a certain size when it is opened? JF

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    A page or a window?
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Aug 2005
    Posts
    200
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    The window. I need it to be full screen when it is opened. Thanks for the help, JF

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Code:
    window.open('http://www.url.com/', '', 'width=' + screen.width + ', height=' + screen.height);
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Aug 2005
    Posts
    200
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Do I put it into srcipt tags?

  6. #6
    Join Date
    Aug 2005
    Posts
    200
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ok here is what I want to do. I have a work form and I need it to be a certain size when they click on the hyperlink. Do I put this with the hyperlink or on the page that is going to be opened? Thanks for the help, JF

  7. #7
    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 one good way to do it:

    HTML Code:
    <a href="workform.htm" onclick="window.open(this.href, '','width='+screen.availWidth+', height='+screen.availHeight+', top=0, left=0');return false;">Work Form</a>
    - John
    ________________________

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

  8. #8
    Join Date
    Aug 2005
    Posts
    200
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    When I put that In it makes the window full screen even over the task bar. It also takes away the scroll bar on the side. I would like it to still have the scroll bar on the side and not cover up the task bar on the bottom. JF

  9. #9
    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

    That's odd, that is what screen.avail is for. This used to work for IE and still does for FF. It is still better in IE than just plain screen, just not better enough. To overcome this in IE, put this in the head of the page:

    Code:
    <script type="text/javascript">
    var hAdjust=document.all? 27 : 0;
    var wAdjust=document.all? 4 : 0;
    </script>
    To add back scrollbar(s) and take advantage of our new adjust variables:

    HTML Code:
    <a href="workform.htm" onclick="window.open(this.href, '','width='+[screen.availWidth-wAdjust]+', height='+[screen.availHeight-hAdjust]+', top=0, left=0, scrollbars=yes');return false;">Work Form</a>
    - John
    ________________________

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

  10. #10
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Quote Originally Posted by John
    var wAdjust=document.all? 4 : 0;
    A 4px wide scrollbar?
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

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
  •