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. AutoSize PopUp

AutoSize PopUp

Scheduled Pinned Locked Moved Web Development
csharpjavascriptcssasp-net
3 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.
  • B Offline
    B Offline
    BobsAfro
    wrote on last edited by
    #1

    I am building a asp.net project using javascript in places. I am currently building some javascript in vb.net to open a new pop up. popup = window.open('ReportPopUp.aspx?",'Report','Top=50,Left=50,titlebar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes'); is what I am using. In the new window there is a grid but until it is built the size is unknown. Is there a way to set the size of the new window to the size of the grid? It does not need to resize after just the intial size on load.

    J B 2 Replies Last reply
    0
    • B BobsAfro

      I am building a asp.net project using javascript in places. I am currently building some javascript in vb.net to open a new pop up. popup = window.open('ReportPopUp.aspx?",'Report','Top=50,Left=50,titlebar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes'); is what I am using. In the new window there is a grid but until it is built the size is unknown. Is there a way to set the size of the new window to the size of the grid? It does not need to resize after just the intial size on load.

      J Offline
      J Offline
      Jonathan van de Veen
      wrote on last edited by
      #2

      You should use the body onload and then read the width of the HTML table, that was generated. Assign this with to the with of the window.

      1 Reply Last reply
      0
      • B BobsAfro

        I am building a asp.net project using javascript in places. I am currently building some javascript in vb.net to open a new pop up. popup = window.open('ReportPopUp.aspx?",'Report','Top=50,Left=50,titlebar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes'); is what I am using. In the new window there is a grid but until it is built the size is unknown. Is there a way to set the size of the new window to the size of the grid? It does not need to resize after just the intial size on load.

        B Offline
        B Offline
        Bradml
        wrote on last edited by
        #3

        Have you tried CSS? *** Ifon't know if this will work ***

        html{width:auto;}

        Actually... that won't work... nvm. you'll have to use javascript.


        Brad Australian "Keyboard? Ha! I throw magnets over the RAM chips!" - peterchen

        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