SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Addict isuru's Avatar
    Join Date
    Nov 2000
    Posts
    206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I know that when you want to open a new window in Javascript you can use the window.open command. That way you can either open a new window full screen or the height and width that you choose.

    But it it possible to open a new window that is maximised?

    also is if you specify the width and the height of a new window, is it possible to specify the screen location where that window appears?

  2. #2
    SitePoint Wizard TWTCommish's Avatar
    Join Date
    Aug 1999
    Location
    Pittsburgh, PA, USA
    Posts
    3,910
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi isuru,

    I am not sure about Maximizing the window (although I would imagine it's possible), however, yes, you can specify, down to the last pixel I believe, where the window ought to popup.

    http://www.sitepointforums.com/showt...threadid=13950

    Check out that thread: there's some code there for a popup window in the form of a function, where, when a link is clicked, a popup is loaded 50 pixels from the top, and 50 pixels from the left of the screen - those numbers can, of course, be changed to show up anywhere on the screen.

    Hope this helps.

  3. #3
    SitePoint Addict isuru's Avatar
    Join Date
    Nov 2000
    Posts
    206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks a lot TWTCommish, the link was very helpful

  4. #4
    JavaScript Guru (Big Ego) Arielladog's Avatar
    Join Date
    Jul 1999
    Location
    SC, USA
    Posts
    390
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To have a window that's maximized, you can try using this:

    window.open('somepage.hmtml','','top=0,left=0,screenY=0,screenX=0,width='+screen.width+',height='+screen.height);

    and you could use other window.open() attributes.

    aDog

  5. #5
    SitePoint Addict isuru's Avatar
    Join Date
    Nov 2000
    Posts
    206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Arielladog
    To have a window that's maximized, you can try using this:

    window.open('somepage.hmtml','','top=0,left=0,screenY=0,screenX=0,width='+screen.width+',height='+screen.height);

    and you could use other window.open() attributes.

    aDog
    Thanks a lot that was really useful


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
  •