Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help adding more perameters to a JS.

Status
Not open for further replies.

gilmore1975

Technical User
Dec 2, 2002
4
GB
Hi all.

I need some help adjusting some javascript on a page im working on.

I'm using Dreamweavers 'showhide' layer behaviours, but it doesn't quite do what I want it to.

I have a girls face as an image map and 3 hot spots. Each spot, when clicked, shows a div with text related to that part of the face.

I need to be able to add to the current script so that the other divs hide as well as showing the selected div.

The current code looks like this :-

<area shape="poly" coords="81,212,90,207,137,211,123,229,96,230" href="#" onClick="MM_showHideLayers('lips','','show')">

This shows the 'lips' layer when clicked. I want it to also 'hide' the 'cheeks' and 'eyes' layer on the same click. My guess was this:-

onClick="MM_showHideLayers('lips','','show'),('cheeks','','hide'),('eyes','','hide')">

Unsurprisingly this doesn't work. Can anyone please show me the proper syntax here? I just can't seem to work out how to add more perameters to the script.

TIA,

Adam.

 
Unless you want to modify MM_showHideLayers() the syntax is:

Code:
onClick="MM_showHideLayers('lips','','show'); MM_showHideLayers('cheeks','','hide'); MM_showHideLayers('eyes','','hide');">
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top