[Javascript] Window dimensions?
tedd
tedd at sperling.com
Sat Jul 15 16:16:15 CDT 2006
John:
myWnd was the name of the window.
This might work better for you:
if (parseInt(navigator.appVersion)>3)
{
if (navigator.appName=="Netscape")
{
winW = window.innerWidth;
winH = window.innerHeight;
}
if (navigator.appName.indexOf("Microsoft")!=-1)
{
winW = document.body.offsetWidth;
winH = document.body.offsetHeight;
}
}
You can see a working example at:
http://xn--ovg.com/ajax_page1/
The last two numbers after "start" are the window coordinates regardless of who opens it.
hth's
tedd
>Tedd,
>
>What is 'myWnd'? Is this a built in object for the current browser
>window? Note I'm not after the dimensions of a Window I open, the user
>already has a Window open when he visits my page, this is the Window I
>need the dimensions of.
>
>Thanks
>
>John Warner
>
>
>> -----Original Message-----
>> From: javascript-bounces at LaTech.edu
>> [mailto:javascript-bounces at LaTech.edu] On Behalf Of tedd
>> Sent: Saturday, July 15, 2006 9:18 AM
>> To: [JavaScript List]
>> Subject: Re: [Javascript] Window dimensions?
>>
>>
>> At 4:41 AM -0400 7/15/06, John Warner wrote:
>> >Is there a way to determine the internal size (the area where the
>> >document displays) of the browser window. Sort of: x = window.width
>> > y=window.height
>> >
>> >I need to place an object in the lower right corner of the users
>> >browser if this helps and I need to get it there no matter
>> what their
>> >browser window size.
>> >
>> >Thanks
>> >
>> >John Warner
>>
>>
>> wndW = document.getElementById("myWnd").getAttribute("width");
>> wndH = document.getElementById("myWnd").getAttribute("height");
>>
>> You could also use css.
>>
>> hth's
>>
>> tedd
>>
>
>
>_______________________________________________
>Javascript mailing list
>Javascript at LaTech.edu
>https://lists.LaTech.edu/mailman/listinfo/javascript
--
------------------------------------------------------------------------------------
http://sperling.com http://ancientstones.com http://earthstones.com
More information about the Javascript
mailing list