Try this instead:
<a href="java script:window.open('foo.html', 'MyPopup', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=250,left = 470,top = 325');">Foo</a>Note: remove the space between java and script to make this work.
is the page to be opened, MyPopup
can be any string and the parameters toolbar
, and resizable
are booleans (0
= turn that feature off, 1
= turn that feature on), width
control the size in pixels of the window, and left
control its position in pixels relative to the top and left edges of the screen.
All the parameters but the first two are optional.
Be warned: this method if user interface design is largely depreciated and considered bad design. Many modern browsers enable the user to override or disable the controls and restrictions available to the developer in this case. For example, Firefox can be set to ignore the parameter=0 restriction and even to force such windows to open in a new tab instead of a popup.
Edited by Amazing Andrew, 25 August 2009 - 12:58 PM.