Connecting Tech Pros Worldwide Forums | Help | Site Map

Frame size

Just D.
Guest
 
Posts: n/a
#1: Nov 19 '05
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.



Bruce Barker
Guest
 
Posts: n/a
#2: Nov 19 '05

re: Frame size


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...[color=blue]
> 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.
>
>[/color]


Just D.
Guest
 
Posts: n/a
#3: Nov 19 '05

re: Frame size


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" <brubar_nospamplease_@safeco.com> wrote in message
news:uXkO7HWNFHA.2704@TK2MSFTNGP15.phx.gbl...[color=blue]
> 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...[color=green]
>> 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.
>>
>>[/color]
>
>[/color]


Just D.
Guest
 
Posts: n/a
#4: Nov 19 '05

re: Frame size


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" <brubar_nospamplease_@safeco.com> wrote in message
news:uXkO7HWNFHA.2704@TK2MSFTNGP15.phx.gbl...[color=blue]
> 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...[color=green]
>> 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.
>>
>>[/color]
>
>[/color]


darrel
Guest
 
Posts: n/a
#5: Nov 19 '05

re: Frame size


> What do you think is it a good idea to initiate a postback every time on[color=blue]
> resize?[/color]

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


darrel
Guest
 
Posts: n/a
#6: Nov 19 '05

re: Frame size


> What do you think is it a good idea to initiate a postback every time on[color=blue]
> resize?[/color]

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


Closed Thread