macroLinkText - title-tag for image?

Discuss macro implementations, ask for macro help (to share your creations, see User Creations, probably either Campaign Frameworks or Drop-in Resources).

Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice

Post Reply
Thargun
Giant
Posts: 188
Joined: Sun Sep 14, 2014 4:27 am

macroLinkText - title-tag for image?

Post by Thargun »

Hi!

If I use a macroLinkText in a frame it's easy to add a tooltip for the link. Like this:

Code: Select all

<span title="Test Tooltip"><a href="[r: macroLinkText("[email protected]:macros")]">the link</a></span>


But if I use an image for the link instead of text, e.g. this:

Code: Select all

<span title="Test Tooltip"><a href="[r: macroLinkText("[email protected]:macros")]"><image src='[r: tableImage("images", 1)]' border="0"></image></a></span>


there seems to be no way to show a tooltip at MouseOver. Do I anything wrong? I'm using b87 by the way.


Nertht
Kobold
Posts: 23
Joined: Sun Jul 27, 2014 3:46 am

Re: macroLinkText - title-tag for image?

Post by Nertht »

Thargun wrote:

Code: Select all

<span title="Test Tooltip"><a href="[r: macroLinkText("[email protected]:macros")]"><image src='[r: tableImage("images", 1)]' border="0"></image></a></span>


there seems to be no way to show a tooltip at MouseOver. Do I anything wrong? I'm using b87 by the way.


And why you dont do that trough ALT property of image? Something like this:

Code: Select all

[image = strformat("<img src='%s' alt='%s'>", tableImage("images", 1),"Test Tooltip")]
[titledImage = macroLink(image,"[email protected]:macros","none")]
<html>[r: titledImage]</html>
Last edited by Nertht on Sun Sep 14, 2014 12:42 pm, edited 1 time in total.

User avatar
aliasmask
Deity
Posts: 8667
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: macroLinkText - title-tag for image?

Post by aliasmask »

That does seem to work. I know there can be some funkyness with macroLink and tooltip because of how the macroLinks were designed. Ie need to use a <span> rather than title in the link and then only text displays tooltip when using title. I was going to suggest using alt for image as well, but I wasn't sure if the macroLink code was going to get in the way. I'm glad you tested it out.

Thargun
Giant
Posts: 188
Joined: Sun Sep 14, 2014 4:27 am

Re: macroLinkText - title-tag for image?

Post by Thargun »

Using ALT works fine. Thank you!

Post Reply

Return to “Macros”