Jump to content

Onmousedown/up Ok With Safari And Opera, Not With Firefox


nicolet

Recommended Posts

The functions<script type="text/javascript" language="JavaScript"> function down1() { document.getElementById('ff').src='images/flipflop010.png'; } function down2() { document.getElementById('ff').src='images/flipflop001.png'; } function up1() { document.getElementById('ff').src='images/flipflop001.png'; } function up2() { document.getElementById('ff').src='images/flipflop000.png'; }</script>together with <img id="ff" class="ff" src="images/flipflop000.png" alt="flipflop" usemap="#ff" /> <map name="#ff"> <area shape="rect" coords="0, 0,50, 70" onMouseDown="down1();" onMouseUp="up1();" alt="" /> <area shape="rect" coords="0,80,50,149" onMouseDown="down2();" onMouseUp="up2();" alt="" /> </map>work OK with Safari and Opera, but not with Firefox. Where's the problem?The entire HTML document is athttp://homepage.mac.com/eltiopaco/Alice/Th...06flipflop.html(click the zeroes on the lower picture).François

Link to comment
Share on other sites

OOPS! Just noticed this. The naming convention linking images to maps is funky. You are correct to use the # symbol in the usemap attribute. But the map name should NOT use the # symbol.
Indeed: the culprit was the # symbol in the usemap attribute.Changing onmousedown and onmouseup to all lower case has no effect.Thank you for your help.François
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...