or if you wanted it in a function for any layer your pass to it:
<script language="Javascript" src="js/dynapi.js"></script> <script language="Javascript"> DynAPI.setLibraryPath('js/'); DynAPI.include('dynapi.api.*'); </script> <script language="Javascript"> DynAPI.onLoad=function() { myObjA = this.document.addChild(new DynLayer(null,120,20,150,150,'#AAAAAA')); myObjB = this.document.addChild(new DynLayer(null,310,20,150,150,'#AAAAAA')); } toggleVis = function(o){ o.setVisible((o.getVisible()?false:true)) } </script> <body> <a href="javascript:void(0)" onclick="toggleVis(myObjA)">toggle object A</a> <a href="javascript:void(0)" onclick="toggleVis(myObjB)">toggle object B</a> </body> hope thats of some use _______________________________________________ Dynapi-Help mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dynapi-help