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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

altering layer vis via onclick

Status
Not open for further replies.

scope

IS-IT--Management
Apr 24, 2002
2
CA
hey all,

i've had a problem plaguing me for weeks (besides the usual ones ;). i'm trying to use an onclick event as part of an imagemap, to alter the visibility of another layer. ie, click there, and that pops up.

it just doesn't work, and i've tried everything. if you need proof, just create a quick image map, and see what happens when trying to alter the visibility. it seems that some onclick events actually do respond, but trying to alter layer visibility results in an object error.

if you've got any suggestions, let me know.

regards,

scott.
scopedesign@hotmail.com
 
So you are trying to alter the visibility of itself? AND some other layer? I don't see why it won't work - are you calling the actions in href='javascript:functionCall()'? I'm not sure but maybe onClick is no good for image maps?

I managed to get it to work though - even with an alert call in the href? There must be some other problem:

<MAP name='bangers'>
<area shape=rect coords=&quot;0,0,20,20&quot; href=&quot;javascript:alert('hello')&quot; onClick='document.all[&quot;tip_1&quot;].style.visibility=&quot;visible&quot;'>
</MAP>


I am not sure what the problem is?
b2 - benbiddington@surf4nix.com
 
thanks bangers..

i was altering other layers visibility with that image map, it just wouldnt work :)

i've sorted it out now, by pure luck. thanks again.

scott.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top