Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-13-2012, 11:21 AM   PM User | #1
coding_coder
New to the CF scene

 
Join Date: Feb 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
coding_coder is an unknown quantity at this point
Window object

In my current javascript code, the window object is being used. But my issue is that if you are slightly zoomed in or out it is not placed correctly. So is there any way to make it take into account the browser zoom level?

Code:
windowHeight=$(window).height(),windowWidth=$(window).width(),
Code:
projectedTop=scrollPos['scrollTop']+((windowHeight/2)-(correctSizes['containerHeight']/2))
coding_coder is offline   Reply With Quote
Old 02-13-2012, 02:06 PM   PM User | #2
Dormilich
Senior Coder

 
Dormilich's Avatar
 
Join Date: Jan 2010
Location: Behind the Wall
Posts: 2,882
Thanks: 9
Thanked 291 Times in 287 Posts
Dormilich is on a distinguished road
the window object (which is also JavaScript's host object) corresponds to the browsers rendering area (it uses the AbstractView interface). you cannot *place* it somewhere.
__________________
please post your code wrapped in [CODE] [/CODE] tags
Dormilich is offline   Reply With Quote
Reply

Bookmarks

Tags
javascript, window object, zoom

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:56 AM.


Advertisement
Log in to turn off these ads.