🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: chile.comp.programacion
Article #1983

Re: Cambiar tama�o de pantalla (IE)

#1983
From: Christian Szita
Date: Thu, 13 Apr 2006 18:12
81 lines
3429 bytes
> Hola!
>
> Alguien me puede ayudar con algun programita o alguna forma de hacer
> que una ventana IE, quede como quedar�a si estuviera maximizada y en
> una configuraci�n de 800x600?
>
> Gracias,
>
> th

Quiz�s esto te sirva:


<script Language="javascript">
<!-- Script Provided By www.DesignerWiz.com -->
<!--
/********************************************************************
        Center-Size Window NN,IE v1.0 written By PV
        //Feel free to use it on any page as long as you leave all comments
//as they are. So others can learn.
//Any questions, suggestions, email me at PaulV420@usa.net
I will outline the script that you need, plus if you need the resize even 
handler
that will reload page when the user tries to resize the page.Thus makes it 
non-resizable
(note make sure there will be no scroll bars. if there is the resize will be 
triggered
and the page will be in constant loop of resizing)
There are also scripts for hiding layerrs, you don't need those i will out 
line what you need
with comments. Have fun with this one. Updates coming!!
This Script was written by Paul Varshavsky
********************************************************************/
//Start script
function Is() {
var agent = navigator.userAgent.toLowerCase();
this.major = parseInt(navigator.appVersion);
this.minor = parseFloat(navigator.appVersion);
this.ns = ((agent.indexOf('mozilla')!=-1) &&
((agent.indexOf('spoofer')==-1) && (agent.indexOf('compatible')== -1)));
this.ns4 = (this.ns && (this.major >= 4));
this.ie = (agent.indexOf("msie") != -1);
this.ie4 = (this.ie && (this.major >= 4));
}
var is = new Is();
var w=800;   //set Width for window
var h=600;   //set Height for window
if(is.ns4){
window.outerWidth  = w;
window.outerHeight = h;
var Xcor = (screen.width-window.outerWidth)/2;
var Ycor = (screen.height-window.outerHeight)/2
window.moveTo(Xcor, Ycor);
}
else if(is.ie4){         //if Internet Explorer 4
//i'm designing this page for no toolbars if you
//will use toolbars put this line in h+=10;
//IE toolbars are a bit smaller so some area will be covered
//that you see in NN if you add 10 pix that compensates
var Ycor=(screen.height-h)/2;
var Xcor=(screen.width-w)/2;
window.moveTo(Xcor, Ycor);window.resizeTo(w,h);
}
//end script this will resize and ceneter your script
//copy from script to /script and place it in head of your page
//Enjoy!! Paul V
</script>

<script language="Javascript">

<!-- Begin

document.oncontextmenu = function(){return false}

// End -->

</script>

-- 
There's no place like 127.0.0.1
http://szita.net 
Technical Details
Message-ID: <4a7iskFrbqkiU1@individual.net>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
References: <1997817a81a2dd7dbf8301677d0ae7bf$1@usenet.no-ip.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1593cb,11de76f93cc73397
X-Google-Attributes: gid1593cb,public
X-Google-Language: SPANISH,ASCII
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: "Christian Szita" <christian@deadspam.com>
Newsgroups: chile.comp.programacion
Subject: Re: Cambiar tama�o de pantalla (IE)
Date: Thu, 13 Apr 2006 14:12:20 -0400
Lines: 83
Message-ID: <4a7iskFrbqkiU1@individual.net>
References: <1997817a81a2dd7dbf8301677d0ae7bf$1@usenet.no-ip.com>
X-Trace: individual.net fKOZ2olr7DPPtinySLAvdwfVR6Az7BSA+a69JVNeoGI/u7fUyz
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
X-RFC2646: Format=Flowed; Original