/    Sign up×
Community /Pin to ProfileBookmark

Help with show/hide layers

I am using Dreamweaver’s built-in show/hide layers behavior (I’m not that much of a coder, more of a designer, I get by by modifying javascripts I find). I am using it to expand/collapse a flooring calculator. It was working great until I decided to use show/hide layers for an image gallery on the same page. For some reason clicking on the calculator hides the gallery layers even though I’m not telling it to show or hide those layers at all.

Here is the code in the head tag.

<script type=”text/JavaScript”>
<!–
function MM_showHideLayers() { //v6.0
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; }
}
//–>
</script>

This is an example of the code on the calc – the one that expands it.

<a href=”#” onClick=”MM_showHideLayers(‘calc_close’,”,’show’,’calc’,”,’show’,’shadow2′,”,’show’,’shadow1′,”,’show’)”><img src=”../images/flooringcalc_click.gif” width=”228″ height=”36″ border=”0″></a>

And here’s one example of code around one of the thumbnail images to show/hide layers with the zoomed in images for the gallery.

<a href=”#” onClick=”MM_showHideLayers(‘hardgall01′,”,’show’,’hardgall02′,”,’hide’,’hardgall03′,”,’hide’,’hardgall04′,”,’hide’,’hardgall05′,”,’hide’,’hardgall06′,”,’hide’,’hardgall07′,”,’hide’)”><img src=”../images/carpetgall/thPark-Avenue_masland.jpg” width=”100″ height=”101″ border=”0″ class=”imgbrdr”></a>

Sorry I’m posting so much code. It’s for a site in development and I’m hesitant to post a link. Does anybody know what could be causing the calc to affect the gallery, why the scripts would be conflicting even though the two don’t reference each other at all??

Thanks ahead of time!

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @artman182 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...