This is a migrated thread and some comments may be shown as answers.

AutoTooltipify and changing alt from javascript

1 Answer 50 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Dave
Top achievements
Rank 1
Dave asked on 24 Aug 2012, 03:18 PM
Here is my scenario:

I have one RadToolTipManager on a page with a bunch of images representing statuses. When the page first loads, the tooltips work correctly for the images. We have javascript functions that change the alt attribute of those images. But after the alt is changed via javascript, the tooltip still shows the old text and not the new updated text. is there a way to not cache the tooltips?

1 Answer, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 27 Aug 2012, 12:21 PM
Hello Dave,

There isn't an event that fires when an attribute is changed on the HTML elements, so the tooltip manager cannot know of this. It goes through the page when the page loads and this is when it takes the values. What you can try is to call its tooltipify() method after you are done changing the attributes:
$get("img1").setAttribute("alt", "new alt attr");
$find("rttm1").tooltipify();

where img1 is your last image and rttm1 is the RadToolTIpManager. You only need to make sure this is executed after the Sys.Application.Load event so that you can get a reference to the RadToolTipManager (it is a script control and this is the point when the object is available).

Kind regards,
Marin Bratanov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
ToolTip
Asked by
Dave
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or