Maximizing forms in ASP.Net

M

mac

Hi everyone

I need your help just want to know why my webforms doest maximize i
paste the
script on the onload event


<head runat="server">
<title>Untitled Page</title>
</head>
<body onload="javascript:
window.innerWidth = screen.width
window.innerHeight = screen.height
window.screenX = 0;
window.screenY = 0;
alwaysLowered = false;
">
<form id="form1" runat="server">
</form>
</body>
</html>


Is there anyway of maximizing the web forms using Java Script? or do I place
my
code on the wrong bdy of the script ? if yes please correct my code and I
want to
know where can place the code.


Thanks and Best Regards
Mac
 
J

John Timney \( MVP \)

try this in the head section

<script language="JavaScript1.2">
<!--
top.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>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top