Foros del Web » Programando para Internet » Javascript »

Mensaje De Alerta

Estas en el tema de Mensaje De Alerta en el foro de Javascript en Foros del Web. Hola! :) Estaba buscando un Código para poner un Alerta que se active al entrar en un sitio web y que al poner aceptar se ...
  #1 (permalink)  
Antiguo 13/03/2002, 04:33
 
Fecha de Ingreso: diciembre-2001
Mensajes: 14
Antigüedad: 22 años, 4 meses
Puntos: 0
Mensaje De Alerta

Hola! :)
Estaba buscando un Código para poner un Alerta que se active al entrar en un sitio web y que al poner aceptar se dirija a otra dirección.
(Es para un Top)
Saludos!

<p><img border="0" src="http://galeon.com/website02/buble3.gif" width="32" height="32"><font face="Verdana" size="1"><br>
Flor 2002
[/CODE]</p>
  #2 (permalink)  
Antiguo 13/03/2002, 08:10
Avatar de Kaopectate
Colaborador
 
Fecha de Ingreso: diciembre-2001
Ubicación: Curaçao (Antillas Holandesas)
Mensajes: 3.179
Antigüedad: 22 años, 4 meses
Puntos: 38
Re: Mensaje De Alerta

Debería funcionar con algo mas o menos asi:

Código:
&lt;html&gt;
&lt;head&gt;
&lt;script language=&quot;JavaScript&quot;&gt;
function aviso(){
 if (confirm(&quot;¿Ir a otro lado?&quot;))
  location=&quot;www.otrolado.com&quot;;
}
&lt;/script&gt;
&lt;/head&gt;
&lt;body onload=&quot;aviso()&quot;&gt;
&lt;/body&gt;
&lt;/html&gt;
Saludos.
  #3 (permalink)  
Antiguo 13/03/2002, 14:49
 
Fecha de Ingreso: diciembre-2001
Mensajes: 14
Antigüedad: 22 años, 4 meses
Puntos: 0
Re: Mensaje De Alerta

Si. Buenísimo...
Muchas Gracias ;)

<p><img border="0" src="http://galeon.com/website02/buble3.gif" width="32" height="32"><font face="Verdana" size="1"><br>
Flor 2002
[/CODE]</p>
  #4 (permalink)  
Antiguo 16/03/2002, 08:01
 
Fecha de Ingreso: diciembre-2001
Mensajes: 14
Antigüedad: 22 años, 4 meses
Puntos: 0
Re: Mensaje De Alerta

Bueno, en realidad no me funciono muy bien...
Si ese mensaje de alerta apareciera en www.otrolado.com y con &quot;Aceptar&quot; quiero mandarlo a www.flor.com, me lo redirecciona a www.otrolado.com/www.flor.com
¿Se entendió mas o menos? Bueno si alguien puede arreglarme este lío le agradezco.
!A ... y que se abra en ventana nueva! PLZ
SALUDOS!!

<p><img border="0" src="http://galeon.com/website02/buble3.gif" width="32" height="32"><font face="Verdana" size="1"><br>
Flor 2002
[/CODE]</p>
  #5 (permalink)  
Antiguo 16/03/2002, 08:08
Avatar de JavierB
Colaborador
 
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 22 años, 2 meses
Puntos: 772
Re: Mensaje De Alerta

Hola, Flor78.

Modificando un poco el código de Kaopectate, podría quedar algo así:

Código:
&lt;html&gt;
&lt;head&gt;
&lt;script language=&quot;JavaScript&quot;&gt;
function aviso(){
if (confirm(&quot;¿Ir a otro lado?&quot;))
window.open(&quot;www.flor.com&quot;);
}
&lt;/script&gt;
&lt;/head&gt;
&lt;body onload=&quot;aviso()&quot;&gt;
&lt;/body&gt;
&lt;/html&gt;
Espero que te sirva. Saludos,

---------------
Pregunta lo que ignoras y pasarás por ton.to 5 minutos.
No lo preguntes y serás ton.to toda la vida.
  #6 (permalink)  
Antiguo 16/03/2002, 08:21
 
Fecha de Ingreso: diciembre-2001
Mensajes: 14
Antigüedad: 22 años, 4 meses
Puntos: 0
Re: Mensaje De Alerta

Mil Gracias JavierB ! :)
Ya me salió ;)
Saludos !!!


<p><img border="0" src="http://galeon.com/website02/buble3.gif" width="32" height="32"><font face="Verdana" size="1"><br>
Flor 2002
[/CODE]</p>
  #7 (permalink)  
Antiguo 16/03/2002, 08:36
 
Fecha de Ingreso: julio-2001
Ubicación: Internet
Mensajes: 1.690
Antigüedad: 22 años, 9 meses
Puntos: 1
Re: Mensaje De Alerta

Hola!,

Pero &quot;Nos&quot; Deja Con La Duda Del Porque¿?, Mira La Razon Es Que El Puso www.otrolado.com, Pero Tenia Que Poner http://www.otrolado.com/ Para Que Supiera Que Se Trataba De Una Pagina Fuera De Nuestro Servidor Y No Una Ruta Hacia Una Carpeta:

&lt;html&gt;
&lt;head&gt;
&lt;script language=&quot;JavaScript&quot;&gt;
function aviso()
{
if (confirm(&quot;¿Ir a otro lado?&quot;))
{
location=&quot;http://www.otrolado.com &quot;;
}
}
&lt;/script&gt;
&lt;/head&gt;
&lt;body onload=&quot;aviso()&quot;&gt;
&lt;/body&gt;
&lt;/html&gt;

<CENTER><FONT COLOR=Black SIZE=2><I>"No Hay Cosas Imposibles, Solo Hombres Incapaces"</I></FONT></CENTER>
  #8 (permalink)  
Antiguo 16/03/2002, 08:42
 
Fecha de Ingreso: diciembre-2001
Mensajes: 14
Antigüedad: 22 años, 4 meses
Puntos: 0
Re: Mensaje De Alerta

Si jlmm !!!
Me di cuenta sola de ese detalle final antes de que escribas el msg.

jeje Gracias igual ;)


<p><img border="0" src="http://galeon.com/website02/buble3.gif" width="32" height="32"><font face="Verdana" size="1"><br>
Flor 2002
[/CODE]</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 11:37.