Tema: Pop under
Ver Mensaje Individual
  #6 (permalink)  
Antiguo 01/04/2011, 13:16
sciutomaxi
 
Fecha de Ingreso: junio-2007
Mensajes: 152
Antigüedad: 16 años, 10 meses
Puntos: 0
Respuesta: Re: Pop under

Cita:
Iniciado por mikel_gomez Ver Mensaje
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
Muy bueno lastima que no funciona en firefox 4 antes en el 3.6 andaba