Hi all
I need to simplify an [B]onClick
this is the javascript Function:
[code=php]
var isReady = false;
function MM_showHideLayers() { //v6.0
if (isReady==true){
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v==’show’)?’visible’:(v==’hide’)?’hidden’:v; }
obj.visibility=v; }
}
}
and here is the code that calls the script:
[code=php]
onClick=”MM_showHideLayers(‘Home’,”,’show’,’Contact’,”,’hide’,’Images’,”,’hide’,’News’,”,’hide’,’Gigs’,”,’hide’,’Music’,”,’hide’,’History1′,”,’hide’,’History2′,”,’hide’,’Review’,”,’hide’);return false”
but instead of using this long winded [B]onClick
[code=php]
onClick=”MM_showHideLayers(gigs);return false
And then it hides all other layers and shows the [B]gigs
Any ideas on how to adapt the [b]function MM_showHideLayers()
Cheers
Chris