Current location: Hot Scripts Forums » General Web Coding » JavaScript » how to obtain the width & height of the client area


how to obtain the width & height of the client area

Reply
  #1 (permalink)  
Old 05-20-04, 12:59 PM
davidklonski davidklonski is offline
Newbie Coder
 
Join Date: Apr 2004
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
how to obtain the width & height of the client area

Hello

Is there a way of knowing what is the widht & height of the client area portion of the browser that is currently viewed by the user?

If the user resizes the window, the width & height should update to reflect the change.

So if the user resizes the screen and makes it tiny, the width and height that I will get will be very small accordingly.

Similarly, is there a way of knowing what is the position (in pixels) of the currently-visible top-left corner of the client area?
Example: If both scrollbars are all the way to the left/top, the position should be (0,0). If the user scrolls to the right by 5 pixels, the position should be (5,0)...

thanks in advance
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 05-14-05, 03:13 PM
TwoD TwoD is offline
Community VIP
 
Join Date: Sep 2003
Location: 404
Posts: 1,813
Thanks: 0
Thanked 0 Times in 0 Posts
Search for DHTML Reference on google. The first hit will be Microsoft's reference to DHTML. There you can find all the attributes and properties needed to do this. You can also try mozilla's site to make sure the script is somewhat cross-browser capable.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
htaccess client area mdittrich Script Requests 2 10-01-03 02:57 PM


All times are GMT -5. The time now is 09:19 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.