|
 |
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
|
 |
|
|

June 9th, 2004, 02:39 AM
|
Friend of Wrox
|
|
Join Date: Sep 2003
Location: Whitstable, , United Kingdom.
Posts: 121
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Maximising the browser window in code
Hi,
I have written a simple ASP.NET form using VB.NET. When my
.aspx default page first comes up under the browser (MS IE5) it is
not fully maximised and I have to click on the browser maximise button.
Is there any way I can get the .aspx form to maximise using
VB code?
Any and all help much appreciated.
Cheers
Chas, Canterbury UK
|

June 9th, 2004, 02:49 AM
|
Authorized User
|
|
Join Date: May 2004
Location: Manchester, , United Kingdom.
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
A simple way would be to use javascript and run a function on the onload of the body tag.
EG
<script>
function Maximise(){
window.moveTo(0,0);
window.resizeTo(screen.width,screen.height);
}
</script>
<body onload="Maximise()">
|

June 9th, 2004, 06:42 AM
|
Friend of Wrox
|
|
Join Date: Sep 2003
Location: Whitstable, , United Kingdom.
Posts: 121
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Where in the page HTML do I put this code?
Do I need to specify that the code is javascript and not vbscript?
If so - how?
So to be dumb but I dont know HTML well.
|

June 9th, 2004, 11:32 PM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Location: California, USA
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
|
|
But remember, Maximised or Minimised Window of Browser is not part of ur page! so dont waste time for that things.
Its my opinion.
Always:),
Hovik Melkomian.
|

June 10th, 2004, 11:12 AM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
Hello,
You can put javascript in the head, or between the head and body tags, as an option. It's pretty flexible.
<head>
...
<script>
...
</script>
</head>
</head>
<script>
...
</script>
<body>
You may even be able to put in the body, although I never do.
Brian
|

June 10th, 2004, 11:20 AM
|
Friend of Wrox
|
|
Join Date: Nov 2003
Location: , , .
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
|
|
Yes, you can put JavaScript anywhere in an HTML document (or ASP, or PHP, etc.), although to have a valid page you would put it within the <html> tags.
Chris' function should work, but it doesn't always actually maximize the window. It just makes it span the width and height of the screen. Usually the maximize button will still be maximize, not minimize. But if it's close enough that you don't care, fine with me.
This code opens an absolutely fullscreen window:
<script type=text/javascript language=javascript>
var nw = window.open('yourpage.asp','nw','fullscreen');
</script>
Notice that I did specify the language and script of the <script> tag, although it is not usually necessary with JavaScript. I believe there's a <meta> tag that allows you to define the default scripting language.
HTH,
Snib
<><
|

June 11th, 2004, 03:59 AM
|
Friend of Wrox
|
|
Join Date: Sep 2003
Location: Whitstable, , United Kingdom.
Posts: 121
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks guys - that helps me greatly - Chas
|
Thread Tools |
Search this Thread |
|
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |