Ver Mensaje Individual
  #2 (permalink)  
Antiguo 18/08/2008, 14:54
Avatar de Panino5001
Panino5001
Me alejo de Omelas
 
Fecha de Ingreso: mayo-2004
Ubicación: -34.637167,-58.462984
Mensajes: 5.148
Antigüedad: 20 años
Puntos: 834
Respuesta: Ventana emergente con ajax

Un ejemplo sencillo, que como verás, nada tiene que ver con ajax (aunque luego lo puedas agregar para modificar el contenido del elemento que se muestra y oculta):
Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml">
<
head>
<
meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<
title></title>
<
style>
.
boxExtposition:relative;}
.
boxIntposition:absolutetop:20pxwidth:300pxheight:300pxborder:1px solid #000; display:none;}
.cerrarposition:absoluteright:3pxtop:3pxborder:1px solid #000; line-height:20px;width:20px; text-align:center; cursor:pointer}
</style>
<
script>
function 
mostrar(que){
    
que.style.display='block';
}
function 
ocultar(que){
    
que.style.display='none';
}
</script>
</head>

<body>
<div class="boxExt"><div class="boxInt">contenido oculto<div class="cerrar" onclick="ocultar(this.parentNode)">X</div></div><a href="#" onclick="mostrar(this.previousSibling)">enlace</a></div>
</body>
</html> 

Última edición por Panino5001; 18/08/2008 a las 15:41