Maximize a Browser Window

Javascript coding ..

Moderators: macek, egami, gesf

Post Reply
User avatar
imroue
New php-forum User
New php-forum User
Posts: 62
Joined: Fri Oct 11, 2002 6:53 am

Maximize a Browser Window

Post by 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>

astro_sk
New php-forum User
New php-forum User
Posts: 8
Joined: Sun Oct 13, 2002 5:00 pm
Location: Brasil

Re: Maximize a Browser Window

Post by 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>

User avatar
tryton
New php-forum User
New php-forum User
Posts: 49
Joined: Wed Jul 09, 2003 8:25 am
Location: Joze
Contact:

Post by tryton » Thu Aug 28, 2003 6:50 am

Are you sure the server you are on can handle Javascript 1.2??

User avatar
ruturajv
php-forum Super User
php-forum Super User
Posts: 1279
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India
Contact:

javascript vs server

Post by 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
Redcircle
Moderator
Moderator
Posts: 826
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA
Contact:

Post by 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.

pootergeist
New php-forum User
New php-forum User
Posts: 191
Joined: Wed Jan 29, 2003 7:11 am
Location: UK
Contact:

Post by 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 ......

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest