saint959 Posted June 6, 2008 Share Posted June 6, 2008 Hey Guys, From what i can see many people have had similiar problems as i am having. I consider myself a complete noob to javascrpt and am having serious problems with the below. basically, its a image that i have mapped with different co-ordinates, what i want is when a user clicks on a section of the image a function must execute. The below works perfectly in IE and Opera but i cant get it to work in Firefox. imagecode <img src="images/colorWheel.jpg" width="241" height="237" border="0" usemap="#Map" onMouseover="this.style.cursor='pointer'"/> then here is one of the area's code within the image <map name="Map" id="Map"> <area shape="poly" coords="149,79,185,35,204,53,160,89" onClick="colorShow('#ff8000')" /> </map> i have removed many of the shapes as they all pretty much do the same thing. the function colorShow() is not being executed at all in firefox. please help Link to comment https://forums.phpfreaks.com/topic/108981-solved-onclick-event-in-firefox/ Share on other sites More sharing options...
saint959 Posted June 6, 2008 Author Share Posted June 6, 2008 Hi, nevermind, i finally found my problem. the external js file i was using was being defined like this: <script type="text/jscript" src="includes/colorWheelAllocate.js"></script> So i changed it to teh below and its working perfectly now <script type="text/javascript" src="includes/colorWheelAllocate.js"></script> Link to comment https://forums.phpfreaks.com/topic/108981-solved-onclick-event-in-firefox/#findComment-559097 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.