Opening a Window - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Opening a Window

adiodatoadiodato Posts: 1Member
Im trying to open a new Browser window using Java Script, and I want the window to display right in the middle of the screen. Are there any code, or functions that can do this.
Thanks

Comments

  • piffypiffy Posts: 4Member
    hi checker!

    This might help you a little bit. It's maybe not exactly what you need, but you can control the position of the new window. Accordingly you can try around a bit and find the best position.
    Very important is -> win.moveTo (x,y);


    win = window.open('your.html','WindowName',
    'width= 800,height=580,resizable,
    status,toolbar,scrollbars');
    win.moveTo (100,25);


    Well I hope it works fine -

    Piffy

  • piffypiffy Posts: 4Member
    hi checker!

    This might help you a little bit. It's maybe not exactly what you need, but you can control the position of the new window. Accordingly you can try around a bit and find the best position.
    Very important is -> win.moveTo (x,y);


    win = window.open('your.html','WindowName',
    'width= 800,height=580,resizable,
    status,toolbar,scrollbars');
    win.moveTo (100,25);


    Well I hope it works fine -

    Piffy

Sign In or Register to comment.