<html>
<head>
<style>
P
{
margin:0px;
padding:0px
}
body
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body>Hi, Geoff<BR>
Since I'm not making any money lately, I'll try making giveaways! <BR>
This code is supposed to do the work.<BR>
*Win OS: IE, FX guarantied, you test it in Safari and let us know.<BR>
<BR>
<HTML><BR><HEAD><BR><TITLE>WIDTH ADJUST</TITLE><BR><style><BR></style><BR></HEAD><BR> <BODY SCROLL=Auto><BR> <DIV><BR> Get adjusted "window width" fit desired "page width".<BR> </DIV><BR> </BODY><BR><SCRIPT><BR>
<FONT>var viewport=512 //change to your desired value<BR>var curBrowser=window.navigator.appName<BR>
<BR>
if(<FONT>curBrowser.length</FONT>>8){<BR> curBrowser = <FONT>curBrowser.slice</FONT>(<FONT>curBrowser.length</FONT>-8)<BR> }<BR>// alert(curBrowser)<BR>
<BR>var scrlbar, yes = 16, no = 0;<BR>
<BR>
var actual = document.body;<BR>
if (actual.scrollHeight > actual.clientHeight){<BR>// alert("scrollbars needed")<BR> scrlbar = yes<BR> }<BR> else{<BR>// alert("scrollbars not needed")<BR> scrlbar = no<BR> }<BR>
<BR>
var BR = new Object()<BR> BR.Explorer = 12<BR> BR.Netscape = 8 //firefox, Safari<BR> BR.Opera = 14//Although Opera & Navigator r currently not supprting "resizeTo()"<BR>
<BR>
var frame = eval("BR."+curBrowser)<BR>
var newWidth = viewport + frame + scrlbar<BR>
<BR>
window.<FONT>resizeTo</FONT>(newWidth, screen.availHeight); <BR>window.moveTo(0,0)<BR>// alert(newWidth)<BR>
</FONT> <BR>
</SCRIPT><BR></HTML><BR>
P.S.:<BR>This algo&code approach is fully original. Place it at the bottom of your other scripts to make sure it works properly.<BR>
Regards.<BR>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<BR> Troy III<BR> progressive art enterprise<BR>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<BR><BR><BR>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #008080 2px solid; MARGIN-RIGHT: 0px">
<HR id=EC_stopSpelling>
From: geoffreyk@seanet.com<BR>To: javascript@LaTech.edu<BR>Subject: RE: [Javascript] Resizing browser window<BR>Date: Tue, 25 Jul 2006 07:27:43 -0700<BR><BR>
<META content="Microsoft SafeHTML" name=Generator>
<STYLE>
.ExternalClass .EC_shape
{;}
</STYLE>
<STYLE>
</STYLE>
<STYLE>
.ExternalClass EC_p.MsoNormal, .ExternalClass EC_li.MsoNormal, .ExternalClass EC_div.MsoNormal
{margin-bottom:.0001pt;font-size:12.0pt;font-family:'Times New Roman';}
.ExternalClass EC_a:link, .ExternalClass EC_span.MsoHyperlink
{color:blue;text-decoration:underline;}
.ExternalClass EC_a:visited, .ExternalClass EC_span.MsoHyperlinkFollowed
{color:blue;text-decoration:underline;}
.ExternalClass p
{margin-bottom:.0001pt;font-size:12.0pt;font-family:'Times New Roman';}
.ExternalClass EC_span.EmailStyle18
{font-family:Arial;color:navy;}
@page Section1
{size:8.5in 11.0in;}
.ExternalClass EC_div.Section1
{page:Section1;}
</STYLE>
<DIV class=EC_Section1>
<P class=EC_MsoNormal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Thanks Troy,</SPAN></FONT></P>
<P class=EC_MsoNormal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">This may help if I can’t find a more direct way of getting these measurements or accomplishing my goal in another manner.</SPAN></FONT></P>
<P class=EC_MsoNormal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Really I am hoping to find some sort of property that I can query to get these values on the fly or a different way to resize a window.</SPAN></FONT></P>
<P class=EC_MsoNormal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"> </SPAN></FONT></P>
<P class=EC_MsoNormal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Thanks though, I very well may end up using these values</SPAN></FONT></P>
<P class=EC_MsoNormal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"> </SPAN></FONT></P>
<P class=EC_MsoNormal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">-Geoff</SPAN></FONT></P>
<P class=EC_MsoNormal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"> </SPAN></FONT></P>
<DIV>
<DIV class=EC_MsoNormal style="TEXT-ALIGN: center" align=center><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">
<HR align=center width="100%" SIZE=2>
</SPAN></FONT></DIV></DIV></DIV></BLOCKQUOTE><br /><hr />Express yourself instantly with Windows Live Messenger! <a href='http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=joinmsncom/messenger' target='_new'>Windows Live Messenger!</a></body>
</html>