Any idea for this?
Problems encountered: Using screen.availHeight and screen.availWidth as the height and width params in window.open causes the browser size to include the taskbar, and positioning at (0, 0) ignores the possibility of the taskbar being up there.
What I want is to open a new window with the size as if it was “maximized” by the user, i.e. it shouldn’t cover the windows taskbar.
(Oh, and no need to remind me that users don’t like Javascript interfering with their browser windows, etc. This is for an internal intranet webapp…)
Does this cause the same problems?
This might get close to what you want:
Try this for opening maximised and removing options to lock down users messing with your internal site. You can play around with the restrictions to suit your requirements.
Taking a quick look at this, it seems
might be the best way to go - I believe this should return exactly the available screen width (It appears to work with on a single monitor if you have multiple monitors).
However it’s not a perfect solution - If anyone else has any suggestions on how to open a real maximised window I’d be interested to hear
This code opens a window maximized, but will it open links from that window maximized
I have
base target=main
just before the closing head tag. Very important that that code is the last tag before the closing head tag, and if any links in the page have thetarget="_parent
.Anything from your page will open full screen if the size is left out of a button code and if there is within the button code to specify a target tag go
target="parent
.I tried all the codes but there maxed codes loose it after a few links oh.. and the way i just showed you makes a true maxed window not a sized floating window
availLeft
/availTop
properties…