Amber M Amber M - 7 months ago 14
HTML Question

Window.open not working as expected

I'm trying to get a link to open as a popup and not as a new window, I tried the following and a few variations yet for some reason the window only opens in a new tab.

<script>window.open('add_game.php', 'height=200,width=150')</script>

Answer

Add the 2nd and 3rd parameters as follows and it should work.

<script>window.open('add_game.php','new', 'toolbars=0,width=400,height=320,left=200,top=200,scrollbars=1,resizable=1')</script>
Comments