Click here to Skip to main content
15,885,707 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi!

I am creating a staff intranet page for the school I work at. The page works best when it is fully maximised (not full screen mode). However some PC's in the school open at like 40% width and height. I was just wondering if there was anyway to force the window to 100% width and height?

Thanks,

Nick
Posted
Comments
Kornfeld Eliyahu Peter 23-Jun-14 8:21am    
Do you mean open IE windows maximized? You can't control that from within your page...
Member 10900826 23-Jun-14 8:24am    
When a member of staff opens IE, It will re-direct to my HTML page. It would be ideal if I could force the window to open at full width, as we have many different monitors/resolutions in the school.
Kornfeld Eliyahu Peter 23-Jun-14 8:26am    
I got you. You can't do that from your web page...
Member 10900826 23-Jun-14 8:27am    
Not even with additional JS?
Kornfeld Eliyahu Peter 23-Jun-14 8:32am    
You page is hosted INSIDE the browser, but has no access to the browser or its properties...

1 solution

XML
<script language="JavaScript">
window.onload = maxWindow;

function maxWindow()
{
window.moveTo(0,0);


if (document.all)
{
  top.window.resizeTo(screen.availWidth,screen.availHeight);
}

else if (document.layers||document.getElementById)
{
  if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth)
  {
    top.window.outerHeight = screen.availHeight;
    top.window.outerWidth = screen.availWidth;
  }
}
}

</script>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900