Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

resolution of client browser

$
0
0
resolution of client browser
Web Connection 5.0
resolution of client browser
09/11/2012
05:49:10 PM
3LF126ZGU Show this entire thread in new window
Gratar Image based on email address
From:
Rick Strahl
To:
Attachments:
None

The window width/height/innerheight/clientheight never changes regardless of which of these properties you use. It is what it is. It's other elements that you have to worry about because they have offsets and padding that can affect the dimensions - window is always a fixed sized frame.

+++ Rick ---


If you want to know how much room you have to display, you can also use .innerWidth/Height and .clientWidth/Height


Ok thank you Rick


You can check the window width and make an Ajax call to send that information to the server:

<script type="text/javascript"> var width = $(window).width(); var height = $(window).height(); $.get("BrowserDimensions.wwt",{ width: width, height: height }); </script>

Then on the server:

FUNCTION BrowserDimensions lnWidth = val(Request.QueryString("width")) lnHeight = val(Request.QueryString("height")) *** Save this for the user ENDFUNC

Keep in mind that this is Asynchronous - so you have to render the initial page to get this information. You get the width and height after the initial page has rendered.

Also if you are already using AJAX callbacks or using a few of them in your page it's better to use a real callback handler.

wcdocs:_1wu1b8jkq.htm

Hope this helps,

+++ Rick ---


Hello,

Is it possible to know the resolution of client browser

Thank you in advance

Michel







Rick Strahl
West Wind Technologies

Making waves on the Web

from Maui, Hawaii


Viewing all articles
Browse latest Browse all 10393

Trending Articles