cdpMat
asked on
Expand small window
I have a script which expands a window to the full width and height of the users screen:
function expand() {
window.moveTo(0,0);
window.resizeTo(screen.ava ilWidth, screen.availHeight);
}
But if the users window is maximized it actually reduces it slightly. Is there a way to invoke the above script only if the window is not maximized?
Thanks,
Matt
function expand() {
window.moveTo(0,0);
window.resizeTo(screen.ava
}
But if the users window is maximized it actually reduces it slightly. Is there a way to invoke the above script only if the window is not maximized?
Thanks,
Matt
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Of course you're right. Then there has to be added even 20 pixels to this test
if((window.innerWidth + 30) > screen.availWidth) width = window.innerWidth;
Try out different values until you've reached the right one.
The height is harder because there's a different between Netscape and IE, and also differences between IE-users. Somebody uses fullscreen, others have in addition to standard toolbars special toolbars +++.
if((window.innerWidth + 30) > screen.availWidth) width = window.innerWidth;
Try out different values until you've reached the right one.
The height is harder because there's a different between Netscape and IE, and also differences between IE-users. Somebody uses fullscreen, others have in addition to standard toolbars special toolbars +++.
Scrollbars depends on user settings to that matter, not always is 20px.
cdpMat,
Some of these questions have been open for some time. Please resolve them appropriately as soon as possible.
https://www.experts-exchange.com/jsp/qShow.jsp?ta=macintosh&qid=20156951
https://www.experts-exchange.com/jsp/qShow.jsp?ta=mssql&qid=20258488
https://www.experts-exchange.com/jsp/qShow.jsp?ta=mssql&qid=11500198
https://www.experts-exchange.com/jsp/qShow.jsp?ta=javascript&qid=20238437
https://www.experts-exchange.com/jsp/qShow.jsp?ta=asp&qid=20246764
https://www.experts-exchange.com/jsp/qShow.jsp?ta=asp&qid=20147617
https://www.experts-exchange.com/jsp/qShow.jsp?ta=asp&qid=20126948
https://www.experts-exchange.com/jsp/qShow.jsp?ta=asp&qid=20124264
https://www.experts-exchange.com/jsp/qShow.jsp?ta=xml&qid=20147856
https://www.experts-exchange.com/jsp/qShow.jsp?ta=director&qid=20152874
Thanks,
Netminder
Community Support Moderator
Experts Exchange
Some of these questions have been open for some time. Please resolve them appropriately as soon as possible.
https://www.experts-exchange.com/jsp/qShow.jsp?ta=macintosh&qid=20156951
https://www.experts-exchange.com/jsp/qShow.jsp?ta=mssql&qid=20258488
https://www.experts-exchange.com/jsp/qShow.jsp?ta=mssql&qid=11500198
https://www.experts-exchange.com/jsp/qShow.jsp?ta=javascript&qid=20238437
https://www.experts-exchange.com/jsp/qShow.jsp?ta=asp&qid=20246764
https://www.experts-exchange.com/jsp/qShow.jsp?ta=asp&qid=20147617
https://www.experts-exchange.com/jsp/qShow.jsp?ta=asp&qid=20126948
https://www.experts-exchange.com/jsp/qShow.jsp?ta=asp&qid=20124264
https://www.experts-exchange.com/jsp/qShow.jsp?ta=xml&qid=20147856
https://www.experts-exchange.com/jsp/qShow.jsp?ta=director&qid=20152874
Thanks,
Netminder
Community Support Moderator
Experts Exchange
another thing:
the scrollbars on IE are 20px
Nushi.