Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Maximizing forms in ASP.Net

Reply
Thread Tools

Maximizing forms in ASP.Net

 
 
mac
Guest
Posts: n/a
 
      05-12-2006
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


 
Reply With Quote
 
 
 
 
John Timney \( MVP \)
Guest
Posts: n/a
 
      05-12-2006
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" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Maximizing a JFrame tele2 Java 1 11-10-2005 10:52 PM
How Do I Write Listeners for Resizing or Maximizing a Window? kvnsmnsn@hotmail.com Java 6 08-30-2005 08:21 PM
Maximizing an aspx page Scott ASP .Net 3 12-13-2003 06:14 AM
Amazon wins patent for ordering HTML forms; Minimizing and Maximizing nospam ASP .Net 13 10-07-2003 04:33 PM
Maximizing Web Page Charles ASP .Net 1 08-09-2003 01:13 AM



Advertisments