Window.open Maximise/Minimise
-
I have coded a page to pop up a new window in the following way:
window.open("testing.htm","now","height=350,width=250,alwaysLowered=0,alwaysRaised=0,channelmode=0,dependent=0,directories=0,fullscreen=0,hotkeys=1,location=0,menubar=0,resizable=0,scrollbars=0,status=0,titlebar=1,toolbar=0,z-lock=0");
Clicking the button that opens the window while the window is currently open will not bring an additional window but, it will overwrite(not sure what action its doing) the values in the controls like text boxes. And not only that the window also goes minimised. Is there a way to bring it back maximised? Please help.:| -
I have coded a page to pop up a new window in the following way:
window.open("testing.htm","now","height=350,width=250,alwaysLowered=0,alwaysRaised=0,channelmode=0,dependent=0,directories=0,fullscreen=0,hotkeys=1,location=0,menubar=0,resizable=0,scrollbars=0,status=0,titlebar=1,toolbar=0,z-lock=0");
Clicking the button that opens the window while the window is currently open will not bring an additional window but, it will overwrite(not sure what action its doing) the values in the controls like text boxes. And not only that the window also goes minimised. Is there a way to bring it back maximised? Please help.:|If you want to open a new window, use "_blank" as the name. If you're ok re-using the existing window but just wish to bring it to the foreground, call the
focus()
method on the object returned fromwindow.open()
:var win = window.open(...);
win.focus();BTW - generally, you can just avoid referencing options you do not want instead of explicitly setting them to 0.
----
...the wind blows over it and it is gone, and its place remembers it no more...
-
If you want to open a new window, use "_blank" as the name. If you're ok re-using the existing window but just wish to bring it to the foreground, call the
focus()
method on the object returned fromwindow.open()
:var win = window.open(...);
win.focus();BTW - generally, you can just avoid referencing options you do not want instead of explicitly setting them to 0.
----
...the wind blows over it and it is gone, and its place remembers it no more...
Thank you very much shog One more question is it possible to check whether a window with a particular name already exist or not without using the reference to that window?