Help - Search - Members - Calendar
Full Version: Window Re-Sizing
HTMLHelp Forums > Web Authoring > Markup (HTML, XHTML, XML)
James471
Take a look at this link, what I really need for this to do is to resize according to the users screen resolution. Is that possible? The webpage was created using flash CS3, and since they changed the way flash writes the html code, along with a javascript file, I have not been able to find a script that works. Any help is greatly appreciated.
Click to view attachment
Darin McGrew
FWIW, I get a blank browser window.

Not everyone enables Flash (or Java, or JavaScript, or ...) for unknown, untrusted sites.
Peter1968
And some people (usually on business machines) don't or can't have flash and JS enabled at all.
James471
QUOTE(Peter1968 @ Jun 17 2007, 06:10 AM) *

And some people (usually on business machines) don't or can't have flash and JS enabled at all.


I do agree with both of you, and thats fine, I respect your opinions. However being in the photo industry flash is a big part of web design. I'm not asking you whether or not people do or don't use flash, or if they are able to or not able to use flash, I'm asking for HTML help.

Is there or is there not a way that the window can be resized based on a users screen resolution?
pandy
Yeah, sure. I *think* you have to use different methods for different browsers.
http://google.com/search?q=javascript+resolution
I think the way you have it now, resizing to fill the window, is much better and more functional though. It doesn't annoy me. It would if the page resized to my resolution and I would have to either scroll or maximize the window.
Christian J
Screen resoluton only sets the maximum limit for how big a browser window/viewport can become, when in fullscreen (F11) mode. But in practice a browser window's height (and sometimes width) is decreased by the toolbars, even if the browser is maximized. In addition, many users may prefer a smaller window size than the maximized mode.

You can also get the size of the user's browser window (not resolution) with javascript. The problem with that is that there are as many sizes as users, so there's little point in making a limited number of templates (like you might do for a few standard resolutions).

Instead the easiest and best solution is to make the web page adapt fluidly to the user's browser window, as explained on http://htmlhelp.com/faq/html/all.html#screen-size
jimlongo
If you feel you know your market, and don't mind some limitations you could certainly do what the example you listed is doing.

They have a piece of javascript in the head
CODE
<script language="JavaScript">
        function init() {
            window.moveTo(0,0);
            window.resizeTo(window.screen.availWidth, window.screen.availHeight);
        }
        </script>


and then they call that in the body
CODE
<body  onLoad="init();" >


You might *beep* some people off, the window resize won't work in all browsers, it won't work for anyone having javascript disabled, and people who have Flash disabled will not see anything if all your content is flash (you might have alternate content for them), but if you're willing to risk that (and I can see why people do) then go for it. ninja.gif
pandy
Isn't that the OP's site? I thought he wanted it to fit the resolution instead of the window. wacko.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.