Board index   FAQ   Search  
Register  Login
Board index php forum :: HTML JavaScript

Maximize a Browser Window

Javascript coding ..

Moderators: macek, egami, gesf

Maximize a Browser Window

Postby imroue » Sat Mar 22, 2003 1:14 pm

I have used the following script to automatically maximize the browser when opened (I don't want to use 2 files). It works when I am using a local file, but once I put the file on the web, I get "permission denied". Any ideas?

<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>
User avatar
imroue
New php-forum User
New php-forum User
 
Posts: 62
Joined: Fri Oct 11, 2002 6:53 am

Re: Maximize a Browser Window

Postby astro_sk » Thu Aug 28, 2003 5:52 am

Made a few alterations and works fine on my server check it out
:wink:

<script language="JavaScript1.2">
<!--
top.window.moveTo(0,0);
if (document.all) {
top.window.resizeTo(window.screen.width,window.screen.height);
}
else if (document.layers||document.getElementById) {
if (top.window.outerHeight<availHeight||top.window.outerWidth<availWidth){
top.window.outerHeight = availHeight;
top.window.outerWidth = availWidth;
}
}
//-->
</script>
astro_sk
New php-forum User
New php-forum User
 
Posts: 8
Joined: Sun Oct 13, 2002 5:00 pm
Location: Brasil

Postby tryton » Thu Aug 28, 2003 6:50 am

Are you sure the server you are on can handle Javascript 1.2??
User avatar
tryton
New php-forum User
New php-forum User
 
Posts: 49
Joined: Wed Jul 09, 2003 8:25 am
Location: Joze

javascript vs server

Postby ruturajv » Thu Aug 28, 2003 9:49 pm

What is the issue for javascript and server

srever is for serverside scripting eg. PHP
and javascript for client side,

so it is not the server that supports the script but the browser or the client :idea:
User avatar
ruturajv
php-forum Super User
php-forum Super User
 
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India

Postby Redcircle » Fri Aug 29, 2003 10:02 am

Personally using this script would be an annoyance to me. If people want their browser maximized they can hit the max button.
User avatar
Redcircle
Moderator
Moderator
 
Posts: 830
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA

Postby pootergeist » Sat Aug 30, 2003 10:50 am

I agree, why maximize a remote browser and risk annoying people.

Personally I surf in a window somewhere in the region of 900 by 800 with a few applications scattered around the edge.
Most sites fit that space quite nicely.

Then you get the odd one that maximizes to fill 1600x1200 (or 1840x1380 sometimes) and their content is lost in the middle.

I think - well obviously the designer has designed for that resolution or they wouldn't have forced maximize - then I prompty leave ......
pootergeist
New php-forum User
New php-forum User
 
Posts: 191
Joined: Wed Jan 29, 2003 7:11 am
Location: UK


Return to JavaScript

Who is online

Users browsing this forum: No registered users and 0 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron