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

Dynamically Change tooltip in JavaScript

2 Answers 156 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Orest
Top achievements
Rank 1
Orest asked on 06 Mar 2010, 01:54 PM
Guys,
1.    I have a textbox with a tooltip
2.    I have a RadToolTipManager with AutoTooltipify="true" that show that tooltip
3.    I have a  RadComboBox. On clientchange event I need to change a tooltip in the textbox.

What is the best way to do this?

Thank you!

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 08 Mar 2010, 08:02 AM

Hello Orest,

Using set_text() method of RadToolTip client object, you can set the text of tooltip from client side.

Checkout the following documentation for most important client side properties and methods.

RadToolTip Client Object

-Shinu.

0
Svetlina Anati
Telerik team
answered on 10 Mar 2010, 12:34 PM
Hello Orest,

You can use the set_text method as Shinu suggested if you want to set different text. Another option is to use the set_contentElement method and set an element (e.g DIV) which holds the content for content. Note that if you want to also use this method for the very first content of the tooltip, you should call it after show() because the tooltip has lazy initialization and the UI will not be created before that. If you want to show the tooltip with some content already the first time, next time you use set_contentElement to change content is OK to be before show().

All the best,
Svetlina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
ToolTip
Asked by
Orest
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Svetlina Anati
Telerik team
Share this question
or