Image Mapping Question

  • donnyp02
  • Born
  • Born
  • donnyp02
  • Posts: 1

Post 3+ Months Ago

I'm trying to use javascript with an Image map so that when someon clicks on one of the items in the javascript, the script will keep count of how many items have been clicked on. I did just a simple script to test it, and I'm getting an error saying there is an object expected in the html part of the AREA code...

Code: [ Select ]
<HTML>
<BODY>
<SCRIPT LANGUAGE="Java Script">
function test()
{
alert("TEST")
}

</SCRIPT>
<IMG NAME="techcard0" SRC="techcard.gif" WIDTH="1341" HEIGHT="953" BORDER="0" USEMAP="#techcard">

<MAP NAME="techcard">
<AREA SHAPE="rect" COORDS="50,161,206,178" NAME="Wheel" onClick="test()">
</MAP>

</BODY>
</HTML>
  1. <HTML>
  2. <BODY>
  3. <SCRIPT LANGUAGE="Java Script">
  4. function test()
  5. {
  6. alert("TEST")
  7. }
  8. </SCRIPT>
  9. <IMG NAME="techcard0" SRC="techcard.gif" WIDTH="1341" HEIGHT="953" BORDER="0" USEMAP="#techcard">
  10. <MAP NAME="techcard">
  11. <AREA SHAPE="rect" COORDS="50,161,206,178" NAME="Wheel" onClick="test()">
  12. </MAP>
  13. </BODY>
  14. </HTML>


I dont understand why its not working, any help would be greatly appriciated!

Thanks!
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • UNFLUX
  • Genius
  • Genius
  • User avatar
  • Posts: 6376
  • Loc: twitter.com/unflux

Post 3+ Months Ago

you've gotta use the [code] tages for it to show up properly ;)

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 116 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.