<html>
<head>
<style>
P
{
margin:0px;
padding:0px
}
body
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body>Here, if you start with: browser sniffing; syntax: supported/not supported,<BR>
values: matched/didn't mach and making other necessary adjustments, -this <BR>
simple demand will require over 100 lines of (getting ugly) script and at least <BR>
a week of debugging!<BR>
<BR>
If you are asking for a solution of simply displaying a HTML object in the lower<BR>
right corner of the page statically, -but nothing more; all you need, is a little magic converting <BR>
physical dimensions into abstract ones, becoming browser independent.<BR>
To do this,<BR>
first: you declare your object in this manner:<BR>
<BR>
<div id="BRC" <BR>
style="<FONT class="">position:absolute; top:100</FONT>%; left:100%; <FONT class="">width:140px; height:140px; background:navy</FONT>;"><BR>
some sample text<BR>
</DIV><BR>
<BR>
This way you've converted Top and Left measures into abstract values, so every browser will know <BR>
how to convert them into their own current dimensions. Now that we're done with the magic, all we <BR>
have to do is to get this object in place, since we now have both, the height and the width of the Unknown Browser.<BR>
<BR>
The script:<BR>
<BR >var <FONT class="">BRC </FONT>= document.getElementById( "BRC" ) <BR>
<FONT class=""><FONT class=""><FONT class="">BRC.style.top</FONT></FONT> </FONT>= (<FONT class=""><FONT class="">BRC.offsetTop</FONT> - BRC.offsetHeight</FONT>)<BR>
<FONT class=""><FONT class="">BRC.style.left</FONT> </FONT>= (<FONT class=""><FONT class="">BRC.offsetLeft</FONT> - <FONT class="">BRC.offsetWidth</FONT></FONT>)<BR>
<BR>
And tihis is all?<BR>
-Of course it's not! <BR>
The following is <FONT class="">optional,</FONT> -depending on the content/layout of the page<BR>
<BR>
[add these on top of current script if needed]<BR>
var <FONT class="">BDY </FONT>= document.getElementById( "BDY" )<BR>
BDY.<FONT class="">style.overflow </FONT>= "hidden"<BR ><BR>
<BR>
and/or/if also the:<BR>
<BR>
BDY.style.overflow="auto"<BR>
[At the end of current, only if needed]<BR>
<BR>
But as I've already stated, -once you are onto tweaking, you are no longer in charge.<BR>
You run into compromise allowing things to get complicated, while code grows rapidly<BR>
into <FONT class="">noncomprehensive bunch of letters</FONT>.<BR>
<BR>
This much for a free solution, otherwise, a better solution would forever be: sending <BR>
a Null-Dimensional, Pilot-Probe-Object to take and retrieve measures, instead of the real one first!<BR>
<BR>
*tested in NN8 (both modes), <FONT class="">IE6, Opera9 and </FONT> FX1.5<BR>
<BR>
<BR>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<BR>
Troy III<BR>
progressive art enterprise<BR>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<BR ><BR ><BR>
<BR>
<HR id=stopSpelling>
<BR>
> From: john@jwarner.com<BR>> To: javascript@LaTech.edu<BR>> Date: Sat, 15 Jul 2006 04:41:09 -0400<BR>> Subject: [Javascript] Window dimensions?<BR>> <BR>> Is there a way to determine the internal size (the area where the<BR>> document displays) of the browser window. Sort of: <BR>> x = window.width <BR>> y=window.height<BR>> <BR>> I need to place an object in the lower right corner of the users browser<BR>> if this helps and I need to get it there no matter what their browser<BR>> window size.<BR>> <BR>> Thanks<BR>> <BR>> John Warner<BR>> <BR>> <BR>> _______________________________________________<BR>> Javascript mailing list<BR>> Javascript@LaTech.edu<BR>> https://lists.LaTech.edu/mailman/listinfo/javascript<BR><BR><br /><hr />With MSN Spaces email straight to your blog. Upload jokes, photos and more. It's free! <a href='http://clk.atdmt.com/MSN/go/msnnksac0030000001msn/direct/01/?href=http://www.imagine-msn.com/spaces' target='_new'>It's free!</a></body>
</html>