Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > page size...

Reply
Thread Tools

page size...

 
 
Jim
Guest
Posts: n/a
 
      10-16-2003
I have a pop window that is displayed and depending on the state of the
system it will contain any number of user controls(ascx). These controls
contain dynamic content and therefore the size of the control can change
dynamically.

Is it possible to work out the size of the page that is going to be
displayed from the code behind page and then resize the pop window
accordingly?

Cheers

Earth Worm Jim



 
Reply With Quote
 
 
 
 
Patrick Dahmen
Guest
Posts: n/a
 
      10-16-2003
Ouch sorry. Didn't see...

"Jim" <ssss> wrote in message news:(E-Mail Removed)...
> I have a pop window that is displayed and depending on the state of the
> system it will contain any number of user controls(ascx). These controls
> contain dynamic content and therefore the size of the control can change
> dynamically.
>
> Is it possible to work out the size of the page that is going to be
> displayed from the code behind page and then resize the pop window
> accordingly?
>
> Cheers
>
> Earth Worm Jim
>
>
>



 
Reply With Quote
 
 
 
 
Patrick Dahmen
Guest
Posts: n/a
 
      10-16-2003
Yes I think it is.

I IE you could generally use getBoundingRect() function to retrieve the size of your controls, even if they have no constant size (width or height params within style element)

for example
<script>
function changeWindowSize()
{
var oSizingControl = document.getElementById('sizingControl');
width = oSizingControl.getBoundingClientRect().right - oSizingControl.getBoundingClientRect().left;
height = oSizingControl.getBoundingClientRect().bottom - oSizingControl.getBoundingClientRect().top;

window.resizeTo(width + 25, height + 50);

}
</script>
<body onload="changeWindowSize()">
<asp:Label runat="server" id="sizingControl">Here is my text, i don't know the width and height of</asp:Label>

</body>

I hope that helped...

"Jim" <ssss> wrote in message news:(E-Mail Removed)...
> I have a pop window that is displayed and depending on the state of the
> system it will contain any number of user controls(ascx). These controls
> contain dynamic content and therefore the size of the control can change
> dynamically.
>
> Is it possible to work out the size of the page that is going to be
> displayed from the code behind page and then resize the pop window
> accordingly?
>
> Cheers
>
> Earth Worm Jim
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Where to put page specific script in a page that inherits from a master page? Eric ASP .Net 0 04-24-2006 11:54 PM
Page not found error when navigating from the child page back to the parent page Samy Java 0 02-04-2006 01:29 AM
Page load of the parent page called twice when a modal dialog is opened from a button click of the user control on the parent page Samy ASP .Net 2 08-15-2005 03:30 PM
RE: Web page is not available - "The Web page you requested is not available offline. To view this page, click Connect" =?Utf-8?B?VHJldm9yIEJlbmVkaWN0IFI=?= ASP .Net 0 06-07-2004 07:11 AM
Re: Web page is not available - "The Web page you requested is not available offline. To view this page, click Connect" Natty Gur ASP .Net 0 06-06-2004 05:46 AM



Advertisments