Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 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
Default 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
  #2 (permalink)  
Old 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
Default

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()">
  #3 (permalink)  
Old 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
Default

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.
  #4 (permalink)  
Old June 9th, 2004, 11:32 PM
Friend of Wrox
Points: 3,558, Level: 25
Points: 3,558, Level: 25 Points: 3,558, Level: 25 Points: 3,558, Level: 25
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: California, USA
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

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.
  #5 (permalink)  
Old 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
Default

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
  #6 (permalink)  
Old 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
Default

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

<><
  #7 (permalink)  
Old 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
Default

Thanks guys - that helps me greatly - Chas
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
open new browser window rocksbhavesh ASP.NET 1.0 and 1.1 Basics 2 July 19th, 2007 07:34 AM
Open new browser window amatytfc ASP.NET 2.0 Basics 2 February 22nd, 2007 06:03 AM
Close Browser Window MoisesZaragoza Javascript How-To 2 February 6th, 2007 08:02 PM
File Browser window Figgis Access 2 November 20th, 2005 01:49 PM
Launch default browser in a new browser window haiying Beginning VB 6 1 August 30th, 2005 05:48 PM



All times are GMT -4. The time now is 06:47 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.