[Javascript] Resizing browser window

Troy III Ajnej trojani2000 at hotmail.com
Thu Jul 27 20:37:06 CDT 2006


Hi!
Interesting, my mail is adding some funny font sizes recently, while yours is posting recursively!
 
>Yes I know that, - 'couldn't leave the height property empty, could I?>It wasn't a complaint -- I just simply meant that your code worked I understand. >??? Fit's exactly what? The desired body width!
>I'm sorry, I don't really know what you're trying to do. However, if >you will explain it, I will be more than happy to test.
Geoff was asking of a way to shrink the main window so he could open another one,
but make sure the body width fits the given new window size. So he needed to know
a foreheads what size should the window be set to, in order that the contents will fit properly.
Since he could get the body width, but not the window width in total including eventual vertical 
scrollbars when present. (At least that's how I understood his problem).
 
So my approach was as follows:


Get the Browser type by vendor name. 

Check if Vscrollbar is needed, therefore present or not.

Assign a known scrollbar width to var with alternative values for on or off

Declare unique browser frame constant widths connected to a BR vendor name.

Use the detected browser name as instruction to get curr br frame size and set frame variable one-shot.

Gather all processed var values into our final var making it available for other script demands. So we can finally make the window resize around any given document body width. 
Other thing in mind was not to use functions or use up any "event" that may be needed by any other ready scripts on the page.  
 
*For correct scrollBar detection the <BODY SCROLL=Auto> should not be omitted if IE encountered!
~~~
>Yes, from my experience 16 pixel wide scrollbars have been typical of >Mac since 1984.That's great news, thanks tedd. It means that this code is widely compatible now.
Pity, new generations of NN and OP are not supporting "window.resizeTo()".
 
Anybody know why???~~~
> Interesting, on the Mac in Safari, FireFox, IE and Netscape, it works > throughout all browser window sizes. In Opera, it doesn't work -- but > Opera has problems with the url as well.> > What browser and OS are you running the test on?
PC Win / IE, Fx Regards.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                         Troy III                           progressive art enterprise~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_________________________________________________________________
Try Live.com - your fast, personalized homepage with all the things you care about in one place.
http://www.live.com/getstarted
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20060728/c7020c0f/attachment.htm>


More information about the Javascript mailing list