Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. JavaScript:Window.Open(...)

JavaScript:Window.Open(...)

Scheduled Pinned Locked Moved Web Development
questioncsharpjavascripthtmltools
10 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Bassam Abdul Baki
    wrote on last edited by
    #1

    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

    O A 2 Replies Last reply
    0
    • B Bassam Abdul Baki

      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

      O Offline
      O Offline
      Om Prakash Pant
      wrote on last edited by
      #2

      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

      B 1 Reply Last reply
      0
      • O Om Prakash Pant

        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

        B Offline
        B Offline
        Bassam Abdul Baki
        wrote on last edited by
        #3

        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

        A 1 Reply Last reply
        0
        • B Bassam Abdul Baki

          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

          A Offline
          A Offline
          Anonymous
          wrote on last edited by
          #4

          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')

          B 1 Reply Last reply
          0
          • A Anonymous

            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')

            B Offline
            B Offline
            Bassam Abdul Baki
            wrote on last edited by
            #5

            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

            R 1 Reply Last reply
            0
            • B Bassam Abdul Baki

              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

              R Offline
              R Offline
              rgoyal
              wrote on last edited by
              #6

              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

              B 1 Reply Last reply
              0
              • R rgoyal

                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

                B Offline
                B Offline
                Bassam Abdul Baki
                wrote on last edited by
                #7

                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

                S 1 Reply Last reply
                0
                • B Bassam Abdul Baki

                  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

                  S Offline
                  S Offline
                  Steven Campbell
                  wrote on last edited by
                  #8

                  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.


                  my blog

                  B 1 Reply Last reply
                  0
                  • S Steven Campbell

                    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.


                    my blog

                    B Offline
                    B Offline
                    Bassam Abdul Baki
                    wrote on last edited by
                    #9

                    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

                    1 Reply Last reply
                    0
                    • B Bassam Abdul Baki

                      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

                      A Offline
                      A Offline
                      Anonymous
                      wrote on last edited by
                      #10

                      http://www.marines.0catch.com/GATEWAY\_TO\_THE\_WORLD.html

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups