473,385 Members | 1,356 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,385 software developers and data experts.

Frame size

How can we get the frame size or the windows size? What JAVA script should
we use to get it in C# codebehind? Is it correct that we can use the jAVA
script onload and onresize to get the current window/frame size and save
these values to the hidden controls on the page to read them from the C#
code?

Can anybody send an example of this JAVA script?

Thanks,
Just D.
Nov 19 '05 #1
5 3146
window.onresize = function() {
document.getElementsByName('size')[0].value = document.body.clientHeight
+ "|" + document.body.clientWidth;
}

where size is the name of the hidden field. note the C# code will not see
the value until a postback.

-- bruce (sqlwork.com)


"Just D." <no@spam.please> wrote in message
news:5tC2e.2476$k57.2342@fed1read07...
How can we get the frame size or the windows size? What JAVA script should
we use to get it in C# codebehind? Is it correct that we can use the jAVA
script onload and onresize to get the current window/frame size and save
these values to the hidden controls on the page to read them from the C#
code?

Can anybody send an example of this JAVA script?

Thanks,
Just D.

Nov 19 '05 #2
Thanks Bruce,

What do you think is it a good idea to initiate a postback every time on
resize? If we add to the same script something to postback will it work
properly?

The idea was to force the IE redraw the picture on each resize to draw it
correctly.

Just D.

"Bruce Barker" <br******************@safeco.com> wrote in message
news:uX**************@TK2MSFTNGP15.phx.gbl...
window.onresize = function() {
document.getElementsByName('size')[0].value = document.body.clientHeight
+ "|" + document.body.clientWidth;
}

where size is the name of the hidden field. note the C# code will not see
the value until a postback.

-- bruce (sqlwork.com)


"Just D." <no@spam.please> wrote in message
news:5tC2e.2476$k57.2342@fed1read07...
How can we get the frame size or the windows size? What JAVA script
should we use to get it in C# codebehind? Is it correct that we can use
the jAVA script onload and onresize to get the current window/frame size
and save these values to the hidden controls on the page to read them
from the C# code?

Can anybody send an example of this JAVA script?

Thanks,
Just D.


Nov 19 '05 #3
Thanks Bruce,

What do you think is it a good idea to initiate a postback every time on
resize? If we add to the same script something to postback will it work
properly?

The idea was to force the IE redraw the picture on each resize to draw it
correctly.

Just D.

"Bruce Barker" <br******************@safeco.com> wrote in message
news:uX**************@TK2MSFTNGP15.phx.gbl...
window.onresize = function() {
document.getElementsByName('size')[0].value = document.body.clientHeight
+ "|" + document.body.clientWidth;
}

where size is the name of the hidden field. note the C# code will not see
the value until a postback.

-- bruce (sqlwork.com)


"Just D." <no@spam.please> wrote in message
news:5tC2e.2476$k57.2342@fed1read07...
How can we get the frame size or the windows size? What JAVA script
should we use to get it in C# codebehind? Is it correct that we can use
the jAVA script onload and onresize to get the current window/frame size
and save these values to the hidden controls on the page to read them
from the C# code?

Can anybody send an example of this JAVA script?

Thanks,
Just D.


Nov 19 '05 #4
> What do you think is it a good idea to initiate a postback every time on
resize?


Do people need to resize their browser? If so, then that'd get pretty
annoying really quick.

Can you explain what, exactly, you are attempting to do in terms of the UI?

-Darrel
Nov 19 '05 #5
> What do you think is it a good idea to initiate a postback every time on
resize?


Do people need to resize their browser? If so, then that'd get pretty
annoying really quick.

Can you explain what, exactly, you are attempting to do in terms of the UI?

-Darrel
Nov 19 '05 #6

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

Similar topics

1
by: Miki Tebeka | last post by:
Hello All, I have a frame that contains a panel and several buttons. I'd like to make one of the button the default button but self.SetDefaultItem(btn) or btn.SetFocus() don't work. The item in...
1
by: bayouprophet | last post by:
Cant get menu script to to put linked page in the same frame. I am new to Java and I am wondering what am I doing wrong? below are my java applet file, frame.html file, and my text file and one...
2
by: RWD | last post by:
I am trying to figure out how to change the target frame in my hyperlink on a DHTML menu. The menu is in one frame and the target frame is called "main" The code is below: Thanks in advance...
5
by: Martin Chen | last post by:
I have a frame set (as per MS FrontPage 2000). It has a contents and a main frame. The contents frame has a menu bar written with with javascript (in the context of a table). In IE6.1 everything...
2
by: PieOPah | last post by:
I have a webpage that uses frames (yes I know, frames - previously been flamed about that, but I do not know anything else to use since I am clueless!!! Been asked to cobble together a site since...
3
by: wardemon | last post by:
Hi All, I would like to ask how can one resize a frame in a website w/o postback? My scenario is the following I have a left frame, a top frame, and a "contents" frame. I placed an imagebutton...
5
by: Hank Mishkoff | last post by:
Is there any way to use JavaScript to determine how much text will fit into a non-scrolling browser frame? I have a non-scrolling frame in which I want to insert some text. I know that the text...
4
by: sumitha | last post by:
Hi I am using wxpython to develop my GUI. I have 3 frame. On the first frame I have ok button and when I click that it will open 2nd frame. And when I click ok button on 2nd frame, it will open 3rd...
2
by: Abneo | last post by:
Hi all, I am very new to Javascript and I am in some need of some help. I am creating a site that has a madlib. I got the madlib code but now I want the results of the madlib to display in...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?

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.