How do I reference a .js file from within an area tag in IE6, I get an error saying rel is not supported by IE6

I'm trying to link to a .js file from within the attached .htm file using IE6 but when I hover over the red spots a required picture does not display.  When I hover over the red spots in anything later than IE6 it works fine, pictures are displayed.

When I hover over the rel call in the area tag it says the rel can not be used with the area tag in IE6.

I need to know how to get this to work in IE6. I've also attached the .js file and the .css file

Please help!! europe----Copy.htm ddimgtooltip.js ddimgtooltip.css
stepcoopcfcAsked:
Who is Participating?
 
Michel PlungjanConnect With a Mentor IT ExpertCommented:
Find the line starting with

$targets.each(function()
 
it is line 99 of the JS file

replace

  $target.attr('rel').match(/\[(\d+)\]/) //match d of attribute rel="imgtip[d]"

with

  var rel = $target.attr('rel');
  if (rel==null) rel = this.getAttribute("rel"); // ie6
  if (rel) rel.match(/\[(\d+)\]/) //match d of attribute rel="imgtip[d]"
  else alert("rel not available")
0
 
Michel PlungjanIT ExpertCommented:
try
$targets.each(function(){
  var $target=$(this);
 var rel = $target.attr('rel');
  if (rel==null) rel = this.getAttribute("rel"); // ie6
  if (rel) rel.match(/\[(\d+)\]/) //match d of attribute rel="imgtip[d]"
  else alert("rel not available")
 var tipsuffix=parseInt(RegExp.$1) //get d as integer
0
 
stepcoopcfcAuthor Commented:
Thanks mplungian it sounds great but can you tell me where to put this.  I think it goes in the htm file but I'm unsure where to put it, can you advise please.
Thanks, Steve.
0
 
Michel PlungjanIT ExpertCommented:
The bold part replaces what is now between the not bold part
0
 
stepcoopcfcAuthor Commented:
Thanks mplungian, but does this go in the htm file in the body or does it go in the attached .js file?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.