Ver Mensaje Individual
  #2 (permalink)  
Antiguo 30/06/2002, 18:26
Avatar de duchamp
duchamp
 
Fecha de Ingreso: enero-2002
Ubicación: Patagonia
Mensajes: 216
Antigüedad: 22 años, 3 meses
Puntos: 1
Re: capas en Dreamweaver

A ver ... prueba con esto:

Código:
<html>
<head>
<title>Hide and show layers</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
<!--
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) 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=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}
//-->
</script>
</head>

<body bgcolor="#FFFFFF" text="#000000">
<div id="Layer1" style="position:absolute; left:13px; top:47px; width:261px; height:94px; z-index:1; background-color: #00CC99; layer-background-color: #00CC99; border: 1px none #000000"></div>
<div id="Layer2" style="position:absolute; left:13px; top:47px; width:261px; height:94px; z-index:2; background-color: #003366; layer-background-color: #003366; visibility: hidden"></div>
<a href="#" onClick="MM_showHideLayers('Layer1','','hide','Layer2','','show')">link</a>
</body>
</html>
  

Si utilizas el Dreamweaver es bastante sencillo. Suerte!