469,270 Members | 1,784 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,270 developers. It's quick & easy.

Maximizing forms in ASP.Net

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
May 12 '06 #1
1 1385
try this in the head section

<script language="JavaScript1.2">
<!--
top.window.moveTo(0,0);
if (document.all) {
top.window.resizeTo(screen.availWidth,screen.avail Height);
}
else if (document.layers||document.getElementById) {
if
(top.window.outerHeight<screen.availHeight||top.wi ndow.outerWidth<screen.availWidth){
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth;
}
}
//-->
</script>

--
Regards

John Timney
Microsoft MVP

"mac" <ma************@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
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

May 12 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by pnp | last post: by
2 posts views Thread by sympatico | last post: by
7 posts views Thread by Elmo Watson | last post: by
1 post views Thread by Brett Romero | last post: by
6 posts views Thread by David In NH | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.