Foros del Web » Creando para Internet » HTML »

Ventana emergente con contenido HTML

Estas en el tema de Ventana emergente con contenido HTML en el foro de HTML en Foros del Web. Hola, qe tal.. soy nuevo en esto de programacion con HTML,, y necesitaba saber como puedo hacer para qe al apretar una imagen se abra ...
  #1 (permalink)  
Antiguo 06/09/2012, 19:31
Avatar de RealTincho  
Fecha de Ingreso: diciembre-2011
Ubicación: Villa Carlos Paz, Cordoba, Argentina
Mensajes: 17
Antigüedad: 12 años, 4 meses
Puntos: 0
Pregunta Ventana emergente con contenido HTML

Hola, qe tal.. soy nuevo en esto de programacion con HTML,, y necesitaba saber como puedo hacer para qe al apretar una imagen se abra una ventana emergente en donde tenga contenido tambien en HTML,, osea, en ves de qe aparezca un simple texto, qe por ejemplo, pueda agregarle el code de un reproductor, o un formulario (yo ya cuento con el code del contenido). o simplemente qe éste html del reproductor o formulario aparezca flotando al presionar la imagen, sin necesidad de hacerlo desde la ventana emergente. desde ya muchas gracias :)
  #2 (permalink)  
Antiguo 06/09/2012, 20:15
Avatar de flashmax  
Fecha de Ingreso: julio-2012
Ubicación: Bs.As. Argentina
Mensajes: 507
Antigüedad: 11 años, 9 meses
Puntos: 86
Respuesta: Ventana emergente con contenido HTML

No se si te entendí bien quieres hacer algo asi:
http://www.jacklmoore.com/colorbox/example1/
__________________
Saludos!
----------------------------------------------------------
  #3 (permalink)  
Antiguo 06/09/2012, 21:12
Avatar de RealTincho  
Fecha de Ingreso: diciembre-2011
Ubicación: Villa Carlos Paz, Cordoba, Argentina
Mensajes: 17
Antigüedad: 12 años, 4 meses
Puntos: 0
Respuesta: Ventana emergente con contenido HTML

sisisi!! pero qe se abra el contenido de un HTML qe ya tengo, qe es una formulario de mensajes :)
  #4 (permalink)  
Antiguo 07/09/2012, 09:37
Avatar de flashmax  
Fecha de Ingreso: julio-2012
Ubicación: Bs.As. Argentina
Mensajes: 507
Antigüedad: 11 años, 9 meses
Puntos: 86
Respuesta: Ventana emergente con contenido HTML

prueba utilizando este Outside Webpage (Iframe) te cargaría tu html
__________________
Saludos!
----------------------------------------------------------
  #5 (permalink)  
Antiguo 07/09/2012, 15:38
Avatar de RealTincho  
Fecha de Ingreso: diciembre-2011
Ubicación: Villa Carlos Paz, Cordoba, Argentina
Mensajes: 17
Antigüedad: 12 años, 4 meses
Puntos: 0
Respuesta: Ventana emergente con contenido HTML

El "Inline HTML" creo qe es el apropiado.. pero, de donde consigo los datos? cuales son los codes qe debería colocar entonces?? :S
  #6 (permalink)  
Antiguo 07/09/2012, 18:48
Avatar de flashmax  
Fecha de Ingreso: julio-2012
Ubicación: Bs.As. Argentina
Mensajes: 507
Antigüedad: 11 años, 9 meses
Puntos: 86
Respuesta: Ventana emergente con contenido HTML

Código HTML:
<html>
	<head>
		<meta charset='utf-8'/>
		<title></title>
		<link rel="stylesheet" href="colorbox.css" />
		<script src="jquery.min.js"></script>
		<script src="jquery.colorbox.js"></script>
		<script>
			$(document).ready(function(){
				//Examples of how to assign the ColorBox event to elements
                $(".inline").colorbox({inline:true, width:"50%"});
				$(".callbacks").colorbox({
					onOpen:function(){ alert('onOpen: colorbox is about to open'); },
					onLoad:function(){ alert('onLoad: colorbox has started to load the targeted content'); },
					onComplete:function(){ alert('onComplete: colorbox has displayed the loaded content'); },
					onCleanup:function(){ alert('onCleanup: colorbox has begun the close process'); },
					onClosed:function(){ alert('onClosed: colorbox has completely closed'); }
				});
				
				//Example of preserving a JavaScript event for inline calls.
				$("#click").click(function(){ 
					$('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here.");
					return false;
				});
			});
		</script>
	</head>
	<body>
		
		<p><a class='inline' href="#inline_content">Abrir formulario</a></p>

		
		<!-- This contains the hidden content for inline calls -->
		<div style='display:none'>
			<div id='inline_content' style='padding:10px; background:#fff;'>
			<p><strong><form action="" method="get">
            <input name="" type="text">
            <input name="" type="text">
            <input name="boton" type="button" value="enviar">
            
            </form></strong></p>
			
			</div>
		</div>
	</body>
</html> 
script completo: http://www.mediafire.com/?6w13ck17j9940pj
__________________
Saludos!
----------------------------------------------------------
  #7 (permalink)  
Antiguo 07/09/2012, 19:32
Avatar de caricatos
Moderador
 
Fecha de Ingreso: abril-2002
Ubicación: Torremolinos (Málaga)
Mensajes: 19.607
Antigüedad: 22 años
Puntos: 1284
Respuesta: Ventana emergente con contenido HTML

Hola:

Para abrir un popup no son necesarias las librerías... busca en las FAQs del foro javascript y encontrarás la solución... También puedes recurrir a maestros del web: Formularios y enlaces dirigidos a ventanas...

Saludos
__________________
Por favor:
No hagan preguntas de temas de foros en mensajes privados... no las respondo
  #8 (permalink)  
Antiguo 26/06/2014, 07:44
 
Fecha de Ingreso: enero-2013
Mensajes: 5
Antigüedad: 11 años, 3 meses
Puntos: 0
Respuesta: Ventana emergente con contenido HTML

Cita:
Iniciado por flashmax Ver Mensaje
No se si te entendí bien quieres hacer algo asi:
[url]http://www.jacklmoore.com/colorbox/example1/[/url]
me podrias pasar el codigo del apartado del Slideshow (podria poner 5 fotos)
  #9 (permalink)  
Antiguo 26/06/2014, 11:39
Avatar de flashmax  
Fecha de Ingreso: julio-2012
Ubicación: Bs.As. Argentina
Mensajes: 507
Antigüedad: 11 años, 9 meses
Puntos: 86
Respuesta: Ventana emergente con contenido HTML

Cita:
Iniciado por batalaior Ver Mensaje
me podrias pasar el codigo del apartado del Slideshow (podria poner 5 fotos)
Código HTML:
<!DOCTYPE html>
<html>
	<head>
		<meta charset='utf-8'/>
		<title>Colorbox Examples</title>
		<style>
			body{font:12px/1.2 Verdana, sans-serif; padding:0 10px;}
			a:link, a:visited{text-decoration:none; color:#416CE5; border-bottom:1px solid #416CE5;}
			h2{font-size:13px; margin:15px 0 0 0;}
		</style>
		<link rel="stylesheet" href="colorbox.css" />
		<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
		<script src="../jquery.colorbox.js"></script>
		<script>
			$(document).ready(function(){
				//Examples of how to assign the Colorbox event to elements
				$(".group1").colorbox({rel:'group1'});
				$(".group2").colorbox({rel:'group2', transition:"fade"});
				$(".group3").colorbox({rel:'group3', transition:"none", width:"75%", height:"75%"});
				$(".group4").colorbox({rel:'group4', slideshow:true});
				$(".ajax").colorbox();
				$(".youtube").colorbox({iframe:true, innerWidth:640, innerHeight:390});
				$(".vimeo").colorbox({iframe:true, innerWidth:500, innerHeight:409});
				$(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});
				$(".inline").colorbox({inline:true, width:"50%"});
				$(".callbacks").colorbox({
					onOpen:function(){ alert('onOpen: colorbox is about to open'); },
					onLoad:function(){ alert('onLoad: colorbox has started to load the targeted content'); },
					onComplete:function(){ alert('onComplete: colorbox has displayed the loaded content'); },
					onCleanup:function(){ alert('onCleanup: colorbox has begun the close process'); },
					onClosed:function(){ alert('onClosed: colorbox has completely closed'); }
				});

				$('.non-retina').colorbox({rel:'group5', transition:'none'})
				$('.retina').colorbox({rel:'group5', transition:'none', retinaImage:true, retinaUrl:true});
				
				//Example of preserving a JavaScript event for inline calls.
				$("#click").click(function(){ 
					$('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here.");
					return false;
				});
			});
		</script>
	</head>
	<body>
		<h1>Colorbox Demonstration</h1>
		<h2>Elastic Transition</h2>
		<p><a class="group1" href="http://www.forosdelweb.com/f4/content/ohoopee1.jpg" title="Me and my grandfather on the Ohoopee.">Grouped Photo 1</a></p>
		<p><a class="group1" href="http://www.forosdelweb.com/f4/content/ohoopee2.jpg" title="On the Ohoopee as a child">Grouped Photo 2</a></p>
		<p><a class="group1" href="http://www.forosdelweb.com/f4/content/ohoopee3.jpg" title="On the Ohoopee as an adult">Grouped Photo 3</a></p>
		
	</body>
</html> 
CAMBIANDO EL CLASS CAMBIAS LA FUNCION <a class="group1"

para cada foto agregas una linea nueva

ejemplo:
<p><a class="group1" href="http://www.forosdelweb.com/f4/content/foto1.jpg" title="Me and my grandfather on the Ohoopee.">Grouped Photo 1</a></p>

<p><a class="group1" href="http://www.forosdelweb.com/f4/content/foto2.jpg" title="On the Ohoopee as a child">Grouped Photo 2</a></p>

<p><a class="group1" href="http://www.forosdelweb.com/f4/content/foto3.jpg" title="On the Ohoopee as an adult">Grouped Photo 3</a></p>

<p><a class="group1" href="http://www.forosdelweb.com/f4/content/foto4.jpg" title="On the Ohoopee as an adult">Grouped Photo 3</a></p>

<p><a class="group1" href="http://www.forosdelweb.com/f4/content/foto5.jpg" title="On the Ohoopee as an adult">Grouped Photo 3</a></p>
__________________
Saludos!
----------------------------------------------------------

Última edición por flashmax; 26/06/2014 a las 11:47 Razón: falto algo
  #10 (permalink)  
Antiguo 30/06/2014, 07:33
 
Fecha de Ingreso: enero-2013
Mensajes: 5
Antigüedad: 11 años, 3 meses
Puntos: 0
Respuesta: Ventana emergente con contenido HTML

una ultima pregunta se podrian poner las 5 fotosteniendo solo una linea
<p><a class="group1" href="http://www.forosdelweb.com/f4/content/foto1.jpg" title="Me and my grandfather on the Ohoopee.">Grouped Photo 1</a></p>
  #11 (permalink)  
Antiguo 30/06/2014, 11:12
Avatar de flashmax  
Fecha de Ingreso: julio-2012
Ubicación: Bs.As. Argentina
Mensajes: 507
Antigüedad: 11 años, 9 meses
Puntos: 86
Respuesta: Ventana emergente con contenido HTML

Cita:
Iniciado por batalaior Ver Mensaje
una ultima pregunta se podrian poner las 5 fotosteniendo solo una linea
<p><a class="group1" href="http://www.forosdelweb.com/f4/content/foto1.jpg" title="Me and my grandfather on the Ohoopee.">Grouped Photo 1</a></p>
si trabajas con php sí sino no!
__________________
Saludos!
----------------------------------------------------------
  #12 (permalink)  
Antiguo 01/07/2014, 06:45
 
Fecha de Ingreso: enero-2013
Mensajes: 5
Antigüedad: 11 años, 3 meses
Puntos: 0
Respuesta: Ventana emergente con contenido HTML

como lo podria hacer

Etiquetas: emergente, flotante, ventanas
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 16:35.