467,087 Members | 1,291 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,087 developers. It's quick & easy.

Resize Iframe width on change of gridview width

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 '07 #1
  • viewed: 3820
Share:
1 Reply
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
<ga***********@gmail.comwrote in message
news:11*********************@p59g2000hsd.googlegro ups.com...
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 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by H.A.P | last post: by
2 posts views Thread by DaveO | last post: by
reply views Thread by gary.comstock@gmail.com | last post: by
3 posts views Thread by Jills | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.