• Publicidad

Similar a Popup

Preguntas y comentarios relacionadas con HTML y CSS.

Similar a Popup

Notapor BigBear » 2016-02-10 19:14 @843

Hola, estoy tratando de mostrar ventanitas desde HTML y Javascript. El tema es que estos popups están obsoletos porque los bloquean todos los navegadores.

El código:

Sintáxis: [ Descargar ] [ Ocultar ]
Using html4strict Syntax Highlighting
  1. <html>
  2. <body>
  3.  
  4. <script>
  5. function popitup2() {
  6.         newwindow2=window.open('','name','height=200,width=150');
  7.         var tmp = newwindow2.document;
  8.         tmp.write('<html><head><title>popup</title>');
  9.         tmp.write('<link rel="stylesheet" href="js.css">');
  10.         tmp.write('</head><body><p>this is once again a popup.</p>');
  11.         tmp.write('<p><a href="javascript&#058;alert(self.location.href)">view location</a>.</p>');
  12.         tmp.write('<p><a href="javascript&#058;self.close()">close</a> the popup.</p>');
  13.         tmp.write('</body></html>');
  14.         tmp.close();
  15. }
  16.  
  17.  
  18. popitup2();
  19.  
  20. </script>
  21. </body>
  22. </html>
  23.  
Coloreado en 0.002 segundos, usando GeSHi 1.0.8.4


¿ Alguien conoce algún similar en HTML y JavaScript que no los bloquee todos los navegadores ?
BigBear
Perlero frecuente
Perlero frecuente
 
Mensajes: 981
Registrado: 2009-03-01 18:39 @818

Publicidad

Re: Similar a Popup

Notapor explorer » 2016-02-11 03:13 @176

Usando capas <div>, usando el estilo display: none.
JF^D Perl programming & Raku programming. Grupo en Telegram: https://t.me/Perl_ES
Avatar de Usuario
explorer
Administrador
Administrador
 
Mensajes: 14476
Registrado: 2005-07-24 18:12 @800
Ubicación: Valladolid, España


Volver a HTML

¿Quién está conectado?

Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 1 invitado