Publiqué en este foro una pregunta, con la finalidad de averiguar si alguien sabía cómo lograr el efecto que se puede ver aqui: http://www.tusmetros.com/site/p_cont...=1&id_subsec=2
No se que pasó, pero el post no está.
En todo caso, y si a alguien le interesa el tema, aqui les dejo una copia de las funciones en javaScript, que permiten hacer eso.
Más abajo les dejo un ejemplo de texto para expandir y contraer.
****************
FUNCIONES
****************
<script language="JavaScript">
<!--
function expandir(id)
{
var obj = objHtml(id)
if (miNavegador.standard)
{
if (obj.style.display == "none")
obj.style.display = 'block';
else
obj.style.display = 'none';
}
else
{
if (obj.display == "none")
obj.display = 'block';
else
obj.display = 'none';
}
}
function objHtml(n, d) {
var p,i,x;
if(!d) d=document;
if (miNavegador.standard)
x = d.getElementById(n)
if(!(x=d[n]) && miNavegador.IE)
x=d.all[n];
for (i=0; !x && i<d.forms.length; i++)
x=d.forms[i][n];
for(i=0; !x && d.layers &&i< d.layers.length; i++)
x=objHtml(n,d.layers[i].document);
return x;
}
window.miNavegador = new oNavegador()
window.miNavegador.iniciar();
function oNavegador( ) {
this.nombre = navigator.appName;
this.iniciar = iniciar;
this.IE = this.nombre.toUpperCase().indexOf('MICROSOFT') >=0;
this.NS = this.nombre.toUpperCase().indexOf('NETSCAPE') >=0;
this.OP = this.nombre.toUpperCase().indexOf('OPERA') >= 0;
this.XX = !this.IE && !this.NS && !this.OP;
this.version = this.iniciar();
this.Verent = parseInt(this.version);
this.standard = (this.IE && this.Verent >=5) || (this.NS && this.Verent >=6)
function iniciar() {
var ver = navigator.appVersion;
if(ver+"" != "NaN")
if (this.IE)
{
ver.match(/(MSIE)(\s*)([0-9].[0-9]+)/ig);
ver = RegExp.$3;
}
return ver;
} //Termina la funcion iniciar el objeto
}
function ver(id)
{
var obj = objHtml(id)
if (miNavegador.standard)
{
obj.style.display = 'block';
}
else
{
obj.display = 'block';
}
}
function no_ver(id)
{
var obj = objHtml(id)
if (miNavegador.standard)
{
obj.style.display = 'none';
}
else
{
obj.display = 'none';
}
MM_swapImgRestore();
}
function jumpTo(URL_List){
var URL = '/cipco/site/p_contenido.php?id_sec=2&ciudad=' + URL_List.options[URL_List.selectedIndex].value;
window.location.href = URL;
}
function mostrar(id){
document.getElementById(id).style.display = 'block';
}
function esconder(id){
document.getElementById(id).style.display = 'none';
}
//-->
</script>
****************
CODIGO EJEMPLO
****************
<A class=listado href='javascript:expandir("capa_2")'>
<LI>Control de llamadas</A><BR>
<DIV class=listado3 id=capa_2 style="DISPLAY: none; POSITION: relative"><BR>
Se acabaron los inútiles listados de llamadas, ahora podrá:
<UL>
<LI>Hacer seguimiento a cada una de las llamadas recibidas
o efectuadas.
<LI>Levantar encuestas personalizadas para cada artículo
por el cual se reciban llamadas.
<LI>Manejar estadísticas sobre las preferencias de los
clientes, efectividad de medios, etc...
<LI>Generar Listados de artículos solicitados </LI>
</UL>
</DIV>
Espero no lo borren, al igual que el anterior. Aún no se cómo se llama este efecto pero ya entiendo de qué se trata.
Saludos.