View Full Version : resize browser window
mavrick422
12-22-2005, 11:37 PM
hey, whats the code to resize the users browser window to a specified width and height?
jscheuer1
12-23-2005, 08:11 AM
Example:
<script type="text/javascript">
window.resizeTo(500, 500);
</script>
Usage:
window.resizeTo(width, height);
mavrick422
12-23-2005, 03:57 PM
i thought that was it. the reason i doubted it was because its not supported by the Safari browser. is there a script that works on all browsers?
mwinter
12-23-2005, 05:04 PM
i thought that was it. the reason i doubted it was because its not supported by the Safari browser. is there a script that works on all browsers?No, and it can be disabled in several of those browsers that do.
Mike
mavrick422
12-23-2005, 06:03 PM
you said there isn't a universal script? how would i disable safari from disabling the script?
jscheuer1
12-23-2005, 08:36 PM
Generally, taking control of the user's interface like that isn't very polite. It is tempting, to render a particular effect. I will even do it on occasion. However, I am happy to let Safari users render it however that browser will and other browsers (as configured), as long as the content is still accessible. If I know that the vast majority of users will get the special effect and that of the rest, 99.99% will still at least see the content, that is good enough for me.
On the other hand, if my target market was like 75% Safari users, I'd find a different approach, rather than trying to override that browser's default settings.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.