views:

44

answers:

5

i have a link like this:

<a href="/index2.php?option=com_jumi&amp;fileid=3&amp;Itemid=11" onclick="window.open(this.href,'targetWindow','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,')

i want the window that is opening to be a specific size. how do i specify the height and width?

+3  A: 
<a href="/index2.php?option=com_jumi&amp;fileid=3&amp;Itemid=11" onclick="window.open(this.href,'targetWindow','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=SomeSize,height=SomeSize')" />

Where width and height are pixels.

hipplar
+1  A: 

Check this resource, They have lot of examples

Teja Kantamneni
same google query? :D
Adam Kiss
:-) obviously...
Teja Kantamneni
+1  A: 

Just add them to the parameter string.

window.open(this.href,'targetWindow','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=350,height=250')
Joel Potter
+2  A: 
window.open ("http://www.javascript-coder.com",
"mywindow","menubar=1,resizable=1,width=350,height=250");

from

http://www.javascript-coder.com/window-popup/javascript-window-open.phtml

:]

Adam Kiss
+1  A: 
window.open('http://somelocation.com','mywin','width=500,height=500');
TGuimond