JavaScript:Window.Open(...)
-
I'm trying to create a small window in HTML without any toolbars, status windows, etc., only just resizable. My question is this. I need to make this window small enough to contain certain text and nothing more. How small can the smallest window be when called using JavaScript:Window.Open(...). Anyone has a better idea on how to do this? Thanks. "For that one fraction of a second, you were open to options you would never have considered. That is the exploration that awaits you. Not mapping stars and studying nebula, but charting the unknown possibilities of existence." - Q (Star Trek: The Next Generation) ^ Blog
-
I'm trying to create a small window in HTML without any toolbars, status windows, etc., only just resizable. My question is this. I need to make this window small enough to contain certain text and nothing more. How small can the smallest window be when called using JavaScript:Window.Open(...). Anyone has a better idea on how to do this? Thanks. "For that one fraction of a second, you were open to options you would never have considered. That is the exploration that awaits you. Not mapping stars and studying nebula, but charting the unknown possibilities of existence." - Q (Star Trek: The Next Generation) ^ Blog
By following code, you can specify the size of a window so that it will open a window with the same size document area <!-- function myOpen(page,width,height) { if (navigator.appName == 'Netscape') { adjWidth = width + 20; adjHeight = height + 20; } else { adjWidth = width + 50; adjHeight = height + 150; } window.open(page,'windowName','width=' + adjWidth + ',height=' + adjHeight + ',toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes'); } myOpen('irt.gif',170,66); //--> Om Prakash
-
By following code, you can specify the size of a window so that it will open a window with the same size document area <!-- function myOpen(page,width,height) { if (navigator.appName == 'Netscape') { adjWidth = width + 20; adjHeight = height + 20; } else { adjWidth = width + 50; adjHeight = height + 150; } window.open(page,'windowName','width=' + adjWidth + ',height=' + adjHeight + ',toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes'); } myOpen('irt.gif',170,66); //--> Om Prakash
I'm familiar with that. However, my question was how small can a web page window be? I haven't been able to make it as small as I want it to be and I'm wondering if there is a browser limit. "For that one fraction of a second, you were open to options you would never have considered. That is the exploration that awaits you. Not mapping stars and studying nebula, but charting the unknown possibilities of existence." - Q (Star Trek: The Next Generation) ^ Blog
-
I'm familiar with that. However, my question was how small can a web page window be? I haven't been able to make it as small as I want it to be and I'm wondering if there is a browser limit. "For that one fraction of a second, you were open to options you would never have considered. That is the exploration that awaits you. Not mapping stars and studying nebula, but charting the unknown possibilities of existence." - Q (Star Trek: The Next Generation) ^ Blog
I do not know about the browser limit but I tried with width=1 height=1 And with these attributes window is really small just like a thumbnail. I tried following code: window.open('P2070013.JPG','','width=1,height=1,scrollbars=yes') In all the cases below, window size is large enough and of same size. Means width=1 and height=1 generates a smallest sized window. window.open('P2070013.JPG','','width=0.1,height=0.1,scrollbars=yes') window.open('P2070013.JPG','','width=0,height=0,scrollbars=yes') window.open('P2070013.JPG','','width=-1,height=-1,scrollbars=yes') window.open('P2070013.JPG','','width=-199,height=-199,scrollbars=yes')
-
I do not know about the browser limit but I tried with width=1 height=1 And with these attributes window is really small just like a thumbnail. I tried following code: window.open('P2070013.JPG','','width=1,height=1,scrollbars=yes') In all the cases below, window size is large enough and of same size. Means width=1 and height=1 generates a smallest sized window. window.open('P2070013.JPG','','width=0.1,height=0.1,scrollbars=yes') window.open('P2070013.JPG','','width=0,height=0,scrollbars=yes') window.open('P2070013.JPG','','width=-1,height=-1,scrollbars=yes') window.open('P2070013.JPG','','width=-199,height=-199,scrollbars=yes')
What browser are you using? When I tried this in IE, I got a window that was 100x100 pixels large. Note: The userinfo.gif image is the Code Project image found next to the average user's name. ************************************************************************** Untitled <!-- function myOpen(page) { window.open(page,'windowName','width=1,height=1,scrollbars=yes'); } //--> [Test](javascript:void();) "For that one fraction of a second, you were open to options you would never have considered. That is the exploration that awaits you. Not mapping stars and studying nebula, but charting the unknown possibilities of existence." - Q (Star Trek: The Next Generation) ^ Blog
-
What browser are you using? When I tried this in IE, I got a window that was 100x100 pixels large. Note: The userinfo.gif image is the Code Project image found next to the average user's name. ************************************************************************** Untitled <!-- function myOpen(page) { window.open(page,'windowName','width=1,height=1,scrollbars=yes'); } //--> [Test](javascript:void();) "For that one fraction of a second, you were open to options you would never have considered. That is the exploration that awaits you. Not mapping stars and studying nebula, but charting the unknown possibilities of existence." - Q (Star Trek: The Next Generation) ^ Blog
I again got the same result with ur code as well but with one change. You get the pop up but main window says page not found. I think you should change ur code as follows(I think that was typing mistake): From: Test To: [Test](javascript:void()) I am using IE 6.0 with XP installed Ranjan Goyal
-
I again got the same result with ur code as well but with one change. You get the pop up but main window says page not found. I think you should change ur code as follows(I think that was typing mistake): From: Test To: [Test](javascript:void()) I am using IE 6.0 with XP installed Ranjan Goyal
It should have been javascript:void(0), but I may have entered it wrong. However, I still get a window that is not 1x1 pixels in size. I'm running Win XP SP2 at home and Win 2K SP4 at work, both with IE and FireFox and the minimum size seems about 100x100 pixels on both machines. I see the picture, but there's plenty of white space to the right and below it. :( "For that one fraction of a second, you were open to options you would never have considered. That is the exploration that awaits you. Not mapping stars and studying nebula, but charting the unknown possibilities of existence." - Q (Star Trek: The Next Generation) ^ Blog
-
It should have been javascript:void(0), but I may have entered it wrong. However, I still get a window that is not 1x1 pixels in size. I'm running Win XP SP2 at home and Win 2K SP4 at work, both with IE and FireFox and the minimum size seems about 100x100 pixels on both machines. I see the picture, but there's plenty of white space to the right and below it. :( "For that one fraction of a second, you were open to options you would never have considered. That is the exploration that awaits you. Not mapping stars and studying nebula, but charting the unknown possibilities of existence." - Q (Star Trek: The Next Generation) ^ Blog
Most recent, patched browsers have limitations on the size and location of popup windows, for security reasons. Older unpatched browsers let you size and locate the window pretty much however you wanted.
-
Most recent, patched browsers have limitations on the size and location of popup windows, for security reasons. Older unpatched browsers let you size and locate the window pretty much however you wanted.
Damn! That answers that once and for all. Thanks. :( "For that one fraction of a second, you were open to options you would never have considered. That is the exploration that awaits you. Not mapping stars and studying nebula, but charting the unknown possibilities of existence." - Q (Star Trek: The Next Generation) ^ Blog
-
I'm trying to create a small window in HTML without any toolbars, status windows, etc., only just resizable. My question is this. I need to make this window small enough to contain certain text and nothing more. How small can the smallest window be when called using JavaScript:Window.Open(...). Anyone has a better idea on how to do this? Thanks. "For that one fraction of a second, you were open to options you would never have considered. That is the exploration that awaits you. Not mapping stars and studying nebula, but charting the unknown possibilities of existence." - Q (Star Trek: The Next Generation) ^ Blog