Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.