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. popup window in javascript

popup window in javascript

Scheduled Pinned Locked Moved Web Development
javascript
4 Posts 3 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.
  • K Offline
    K Offline
    Kanjinghat
    wrote on last edited by
    #1

    Dear All, Can i specify the Popup width and height in percentage instead of pixels.

    Ramesh.Kanjinghat

    Steve EcholsS K D 3 Replies Last reply
    0
    • K Kanjinghat

      Dear All, Can i specify the Popup width and height in percentage instead of pixels.

      Ramesh.Kanjinghat

      Steve EcholsS Offline
      Steve EcholsS Offline
      Steve Echols
      wrote on last edited by
      #2

      You can calculate the pixel size using screen.width and screen.height. var window_width = screen.width * 0.50; // 50% of the screen width var window_height = screen.height * 0.25 // 25% of the screen height


      - S 50 cups of coffee and you know it's on!

      • S
        50 cups of coffee and you know it's on!
        Code, follow, or get out of the way.
      1 Reply Last reply
      0
      • K Kanjinghat

        Dear All, Can i specify the Popup width and height in percentage instead of pixels.

        Ramesh.Kanjinghat

        K Offline
        K Offline
        Kanjinghat
        wrote on last edited by
        #3

        thanX a lot Steve. Simple but a good solution.

        Ramesh.Kanjinghat

        1 Reply Last reply
        0
        • K Kanjinghat

          Dear All, Can i specify the Popup width and height in percentage instead of pixels.

          Ramesh.Kanjinghat

          D Offline
          D Offline
          David Domingues
          wrote on last edited by
          #4

          Size in % is given regarding the size of the document, so regarding to what, should be given the size of the window, if it is the object you are creating? if you want to define the size of the window in percentage of the size of the screen, then i think you will have to program it.

          Contact me! Please feel free to visit my site

          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