Resize Iframe width on change of gridview width

Discussion in 'ASP .Net' started by gary.comstock@gmail.com, Jan 9, 2007.

  1. Guest

    We have a non asp web page that contains a hyperlink which opens an
    iframe. The iframe is hidden until the hyperlink is selected then
    javascript toggles the visibility to 'visible'. Inside the iframe is
    our aspx page which contains a gridview. I've manually set the iframe
    width to larger than the gridview will ever be and have
    allowtransparency set to 'true' so you really can't see the iframe,
    just the gridview.

    As gridview paging and sorting occur the gridviews width changes and
    I'm trying to change the iframe width to match. I'm having all kinds
    of trouble as I can't figure out the gridview width either with
    Javascript or in the C# codefile or how to pass that width to the
    parent iframe. Can someone please give me some assistance.

    Regards,
    gary
     
    , Jan 9, 2007
    #1
    1. Advertising

  2. What if you just set the iframe width to 100%? What is the container for the
    iframe?

    --
    Eliyahu Goldin,
    Software Developer & Consultant
    Microsoft MVP [ASP.NET]
    http://msmvps.com/blogs/egoldin


    <> wrote in message
    news:...
    > We have a non asp web page that contains a hyperlink which opens an
    > iframe. The iframe is hidden until the hyperlink is selected then
    > javascript toggles the visibility to 'visible'. Inside the iframe is
    > our aspx page which contains a gridview. I've manually set the iframe
    > width to larger than the gridview will ever be and have
    > allowtransparency set to 'true' so you really can't see the iframe,
    > just the gridview.
    >
    > As gridview paging and sorting occur the gridviews width changes and
    > I'm trying to change the iframe width to match. I'm having all kinds
    > of trouble as I can't figure out the gridview width either with
    > Javascript or in the C# codefile or how to pass that width to the
    > parent iframe. Can someone please give me some assistance.
    >
    > Regards,
    > gary
    >
     
    Eliyahu Goldin, Jan 9, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    474
  2. Replies:
    0
    Views:
    955
  3. Replies:
    1
    Views:
    1,584
  4. Replies:
    2
    Views:
    1,291
    Adrienne
    Feb 13, 2005
  5. Daedalous
    Replies:
    3
    Views:
    788
    Daedalous
    Jan 16, 2004
Loading...

Share This Page