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

ToolTip

3 Answers 43 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Nithya Rani
Top achievements
Rank 1
Nithya Rani asked on 05 Mar 2012, 02:08 PM
Hi

i want to assign my tooltip text value by using the bellow code.  Control ID will be my RadToolTip ID.

string myScript = @"window.opener.document.getElementById('" + controlID + "').value = '" + strcomment.Trim() + "';window.close();";

Regards
Nithya

3 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 07 Mar 2012, 12:17 PM
Hi Nithya,

In order to set the text in the RadTooltip you must first get a reference to it via the $find() method and then use its client-side API and more precisely the set_text(newText) method.


All the best,
Marin
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.
0
Nithya Rani
Top achievements
Rank 1
answered on 07 Mar 2012, 01:18 PM
Hi

I have used the bellow code but its not working.

string myScript = @"window.opener.$find('" + controlID + "'). set_text( '" + strcomment.Trim() + ")';window.close();";

Regards
NIthya,
0
Marin Bratanov
Telerik team
answered on 09 Mar 2012, 03:01 PM
Hi NIthya,

As long as the ClientID you pass to the function is correct and both pages come from the same domain so you can access them via JavaScript things will work. You must also make sure your code is executed at all, for example add an alert. I am attaching here a simple page that works: http://screencast.com/t/cilp55KQssd. You can use this as base for further developing this functionality, for example call a function from the main page that will take the new text as a parameter and get the reference by itself.


Regards,
Marin
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
Nithya Rani
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Nithya Rani
Top achievements
Rank 1
Share this question
or