View Full Version : onload maximise window function?
10-13-2006, 09:43 PM
hey i am creating a mini os type website, with an infinite visual start bar, draggable windows and i am using the contractable headers to minimise the windows. i have an iframe browser script provided by our freindly neiborhood twey, and im hoping it will be good once its done.
but thats not my problem.
i was wondering how to maximise the window its in, and remove the all the toolbars. the opposite would have to be done once the user leaves the site though....
Thanks for your time, and Goodday to you all,
____Ryan "Boxxertrumps" Trumpa
10-14-2006, 08:07 AM
Can't be reliably done in today's multi-browser environment.
10-14-2006, 01:39 PM
but it can still be done, cant it?
10-14-2006, 07:12 PM
Not reliably. There is the window.resizeTo(x, y) object (which could be set off of the user's screen.availWidth and screen.availHeight objects). Many browsers block this just as a matter of course, others do not support it, others - it depends upon security settings. Only IE has objects that can be used to remove and replace the chrome of an already active window, several items are off limits due to security reasons - all of these commands can be (and often are) blocked with IE's own settings. You can achieve something like this via the window.open() object but, it requires a pop up and that is routinely blocked/modified by all browsers depending upon their security settings - once again, several items of the chrome are off limits.
If you want your page to be interoperable, stick to what is inside the window - and for that matter avoid any dependence upon scripting. However, if you still want to do this as an exercise in scripting, that's fine, just leave the window alone as, anything you think that you are doing to it cannot be relied upon.
10-14-2006, 10:34 PM
10-14-2006, 10:40 PM
I believe that popup windows have some options like this... but they are obviously not compatible due to popup blockers and such. Usually, however, if the user initiates a popup by clicking a link, it works... just not if it's done automatically. Popup blockers are designed to check for this.
(I think popup windows can even be set to fullscreen, like hitting F11)
10-15-2006, 12:06 AM
would it be possible to set off a function key with JS? if it is then theats cool but since the F-keys can be configured, bad stuff might happen. (thanks for the link tech support.) i probabally should of used the search bar instead of looking for it myself... do-it-yourselfer-genomes and junk, mumble mumble......mumble.....
10-15-2006, 02:33 AM
Does nothing with the chrome. Is easily blocked in FF and IE with common security settings, doesn't work in other browsers. What about side bars - like search or history in IE or a bookmarked site open in a side bar in FF?
As I said, unreliable.
would it be possible to set off a function key with JS?
No. However, you could have an item on your page requesting that folks hit F11 for 'best results' or whatever. This could be even been hidden if there were already enough screen real estate for your mock OS.
10-15-2006, 10:37 AM
You can also remove the toolbars(at least in FF as far as I know) try searching the MDC documentation on the window object. But it prompts the user everytime to let the script to be run or not.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.