Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

modifying this tooltip builder to call from an image map

Status
Not open for further replies.

fpl9250

Programmer
Jan 22, 2007
46
US
Hello,

I'm using the code in the link below to pop up a tool tip from a link


This code calls the script using REL inside the <a></a> tags. When I put that inside the image map like this

<area shape="poly" coords="399,242,390,225,409,227" href="#" rel="balloon1">

but it's not working, and I'm sure it's because the REL doesn't work inside an image map. What can I replace it with? How can I work around this?

Thank you in advance
 
Hi

First of all, learn HTML. Stuffing tags with invalid attributes leads nowhere. The [tt]area[/tt] tag has no [tt]rel[/tt] attribute.

For second, look at the JavaScript code you try to use. In the first line of initalizetooltip() function ( line 99 of the file balloontip.js ) is getting a list of [tt]a[/tt] elements. Only. No [tt]area[/tt] or anything else.

Personally I think that using the [tt]rel[/tt] attribute for this purpose is poor scripting style. So I would give up with that script and look for another.

Feherke.
 
Can you suggest any better scripts?

Thanks
 
Hi

Sorry, I can not. Otherwise I would already suggest it...

But to suggest something anyway, I would probably modify that script to do its job for [tt]area[/tt] elements instead of [tt]a[/tt] and to recnognise the elements which needs tooltip based on their [tt]className[/tt] instead of [tt]rel[/tt].

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top