473,403 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

page size...

Jim
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

Nov 17 '05 #1
2 1998
Ouch sorry. Didn't see...

"Jim" <ssss> wrote in message news:OC**************@TK2MSFTNGP10.phx.gbl...
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

Nov 17 '05 #2
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:OC**************@TK2MSFTNGP10.phx.gbl...
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


Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Michael Brennan-White | last post by:
If I submit my for using a get action the resulting page loads . If I use a post action I get an error page saying "The page cannot be found". I am calling the originating page!!! This happens...
1
by: Arun Nair | last post by:
Hi, I have the following jsp page. I am able to view only a part of it(until the occurence of the first City text box). If i remove the first few fields from the page, I am able to see a few...
7
by: Drew | last post by:
I have a db table like the following, UID, int auto-increment RegNo Person Relation YearsKnown Now here is some sample data from this table,
0
by: Nathan | last post by:
Hi, I seem to having a peculiar problem with the display of odd and even pages in XSL-FO. Here is a small background of the problem. My xsl stylesheet mentions my fo:layout-master-set as ...
0
by: Jeff | last post by:
Hi - I have an ASP.NET page that hangs (some times; if it loads for you, try refresh/F5 several times) when I try to run it on my localhost. It contains an HTML table for formatting, and within...
1
by: Raja Shekar | last post by:
HI Every body , I would like to know whether is it mandatory to give Tablespace page size and Bufferpool page size equal..? i also heard like while creating tablespace if pages size of tablespace...
6
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of...
1
by: soluvah | last post by:
Hello Folks, Been trying to widen my site's body from "779" to "1000" so it almost fills the window. IE 7 on windows XP just dismantles the pages and leaves wide gaps between the left column and...
3
by: hsahealthsavings | last post by:
I made this page using a free html editor called formbreeze. The issue is 1) There is a whole bunch of white space at the end of the page that I cannot seem to figure how to get rid of 2) I have...
3
by: premprakashbhati | last post by:
hi, good evening.. i am going to upload an image in a web form .....for that iam using HTML input(file) control and one web control button i.e., Upload_Button() here is the code ...its work fine...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.