[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 473
  • Last Modified:

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
0
stepcoopcfc
Asked:
stepcoopcfc
  • 3
  • 2
1 Solution
 
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
 
Michel PlungjanIT 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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now