Tema: Pop under
Ver Mensaje Individual
  #4 (permalink)  
Antiguo 07/01/2003, 04:13
Avatar de mikel_gomez
mikel_gomez
 
Fecha de Ingreso: febrero-2001
Mensajes: 482
Antigüedad: 23 años, 2 meses
Puntos: 3
Re: Pop under

A ver angelc:

1. Cuando se abre una página (onload, ejecutamos una función javascript para abrir el popunder.
Código:
<body onload="abrirVentanaDebajo();">
2. Podemos abrir una ventana por debajo, si creamos una nueva ventana y devolvemos el foco a la ventana principal; de la siguiente manera:
Código:
function abrirVentanaDebajo(url) {
  var ven = window.open(url, 'nom', 'width=400,height=240');
  ven.blur();
  window.focus();
}
El ejemplo completo podría ser:
Código:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 Strict//ES" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
  <head>
    <title>"popunder"</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <script type="text/javascript">
    <!--
      function abrirVentanaDebajo(url) {
        var ven = window.open(url, 'nom', 'width=400,height=240');
        ven.blur();
        window.focus();
      }
    //-->
    </script>
  </head>
  <body onload="abrirVentanaDebajo('http://www.forosdelweb.com');">
    <p>Prueba "popunder"</p>
    <p>
      <img src="http://www.w3.org/Icons/valid-xhtml11"
          alt="xhtml 1.1 válido" height="31" width="88" />
    </p>
  </body>
</html>
¿Es lo que quieres?
Saludos,
Mikel
__________________
Mikel Gómez
Hay que aprender mucho para saber poco