Harag wrote:
On Fri, 27 Aug 2004 12:46:42 -0700, "Larry R Harrison Jr"
<no***@noone.com> wrote:
I have pull-down menus in javascript and I have the code for opening a link
in a new window. But I want it to open a full-sized window. I can't figure
out the syntax. What I have so far:
Menu5_5_1=new Array("'Lonely Church","javascript:window.open
('http://www.photo.net/photodb/photo?photo_id=2640310')","",0,20,300);
Loop up more info on the window.open() method, before the end bracket
there is more options you can put in it.
window.open('file', 'winname', 'features');
eg
window.open('photo.asp', 'PictureWindow', 'width=300, height=300')
The 3rd parameter should not contain any spaces. Some user agents do not honor
your "features" if you include any white space.
if you want to do full screen in IE then put "fullscreen" in the
features part.
Documentation for window.open():
IE: <url:
http://msdn.microsoft.com/workshop/a...ods/open_0.asp />
Netscape 4 (although most of this stuff is fairly cross-browser): <url:
http://devedge.netscape.com/library/...w.html#1202731
/>
Gecko-based browsers (Mozilla, Firefox, Camino, Netscape 7): <url:
http://www.mozilla.org/docs/dom/domr...6.html#1019331 />
Note that the Gecko DOM reference appears incomplete. I believe the features
list for window.open() on Gecko-based browsers supports both screenX/Y and
top/left (I'm probably wrong and I'm too lazy to test it).
Also, Gecko-based browsers support "fullscreen=1", but it is not the same as the
effect you get when you do it in IE.
As a general rule-of-thumb when it comes to window.open() there is no general
rule-of-thumb. You'll want to check the documentation for each user agent you
want to support, then test the resulting code to ensure it works as documented.
And after all that, there's no guarantee your attempt to open a new window in my
user agent will be honored anyway. window.open() in my user agent either a) does
nothing or b) if I really need the window to perform some task, it opens in a
new tab which will not be resizable.
--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ -
http://jibbering.com/faq