Foros del Web » Programando para Internet » Javascript »

abrir segun resolucion

Estas en el tema de abrir segun resolucion en el foro de Javascript en Foros del Web. hola que tal bueno tengo pequeño problemilla bueno necesito que al entrar a un sitio cheque si la resolucion es de 800*600 y se vaya ...
  #1 (permalink)  
Antiguo 22/05/2002, 10:59
Avatar de nemo  
Fecha de Ingreso: enero-2002
Mensajes: 247
Antigüedad: 22 años, 3 meses
Puntos: 0
abrir segun resolucion

hola que tal bueno tengo pequeño problemilla

bueno necesito que al entrar a un sitio cheque si la resolucion es de 800*600 y se vaya a una url y si es de 1024*768 se vaya a otra.

gracias

<P><center><embed width="350" height="60" loop=true src="http://www.webxcreen.com/firmas/nemo.swf"></center></P>
  #2 (permalink)  
Antiguo 22/05/2002, 11:14
Avatar de lochorui  
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 899
Antigüedad: 22 años, 2 meses
Puntos: 2
Re: abrir segun resolucion

ahi va men:
Cita:
&lt;script language=&quot;JavaScript&quot;&gt;
&lt;!--
// Copyright 2001 by www.CodeBelly.com
// Do *not* remove this notice.

// INSTRUCTIONS

// Place this script in the &lt;head&gt; of the page you will use
// for redirection *only*. It should *not* be placed in a
// regular (content) page.

// Set page destinations for the various screen sizes below.
// If the pages are in the same directory as the page with
// this script, only the page filename is needed; otherwise
// use the full, http://www.site.com/page.html address.

// If you have one page used for more than one size (say,
// both 1024 and Larger), then use the same page address
// in each of the associated variables.

pageFor640 = &quot;pageFor640.html&quot;;
pageFor800 = &quot;pageFor800.html&quot;;
pageFor1024 = &quot;pageFor1024.html&quot;;
pageForLarger = &quot;pageForLarger.html&quot;;

// Set showAlert to &quot;yes&quot; if you wish an alert box to appear
// when the visitor hits your referer page; otherwise, set
// it to &quot;no&quot;

showAlert = &quot;yes&quot;;

// This is the message that will be seen if showAlert is
// used; alter it as needed.

sayOnAlert = &quot;Redirecting to a page designed for your screen size...&quot;;

// DO NOT EDIT BELOW THIS LINE.
// ----------------------------

var Wide = screen.width;

if (Wide &lt;= 640){
if (showAlert == &quot;yes&quot;){
alert(sayOnAlert);
}
window.location = pageFor640;
}

else if (Wide &lt;= 800){
if (showAlert == &quot;yes&quot;){
alert(sayOnAlert);
}
window.location = pageFor800;
}

else if (Wide &lt;= 1024){
if (showAlert == &quot;yes&quot;){
alert(sayOnAlert);
}
window.location = pageFor1024;
}

else {
if (showAlert == &quot;yes&quot;){
alert(sayOnAlert);
}
window.location = pageForLarger;
}

//--&gt;
&lt;/script&gt;
espero te sirva . cualquier duda me contactas ;)
  #3 (permalink)  
Antiguo 22/05/2002, 11:28
Avatar de nemo  
Fecha de Ingreso: enero-2002
Mensajes: 247
Antigüedad: 22 años, 3 meses
Puntos: 0
Re: abrir segun resolucion

gracias

<P><center><embed width="350" height="60" loop=true src="http://www.webxcreen.com/firmas/nemo.swf"></center></P>
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 15:50.