Well this is simple script to get your browser maximised onload:
<html>
<head>
<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>
</head>
<body>Testing</body></html>
I just tested it it IE. Hope this works fine in other browsers.
You can also open up a new window as maximised. Check the script snippet below:
function fullScreen(theURL) {
window.open(‘testwindow.html’, ”, ‘fullscreen=yes, scrollbars=auto’);
}
If you would like to use jQuery here, you can use the following jQuery methods:
var height = $(window).height();
var width = $(window).width();
Hope this helps.
This Code is not working in other browser like firefox and chrome