Ver Mensaje Individual
  #3 (permalink)  
Antiguo 25/02/2009, 09:15
Avatar de jseros
jseros
 
Fecha de Ingreso: agosto-2008
Ubicación: Bogotá
Mensajes: 218
Antigüedad: 18 años, 1 mes
Puntos: 18
Respuesta: ocultar mostrar div...

Saludos. Otra alternativa:

Código HTML:
<a href="#" onclick="MostrarOcultar( this );"><img src="img/iconos/imagen.gif"></a> 
Código PHP:
function MostrarOcultar( obj )
{
      
//establecemos un atributo para verficar el estado del elemento
      //en el caso de que se necesite utilizan la funcion en mas de uno
      
if( obj.getAttribute( "$oculto" ) )
      {
           
obj.style.display = "";
           
obj.setAttribute( "$oculto" , 0 );
      }
      else
      {
           
obj.style.display = "none";
           
obj.setAttribute( "$oculto" , 1 );
      }
       return 
true;
} 

Exitos.