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

Find elements within toolTip client side

2 Answers 46 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
JustinWong
Top achievements
Rank 1
JustinWong asked on 25 Dec 2011, 03:06 PM
Hi:

I have a toolTip. Within it, I have a table with 3 rows. Two rows has an asp:label control in it. One row as an asp:LinkButton in it.  Before the toolTip is shows, how can I get each of those 3 controls and set it's text/value using javascript?

Thanks for your help!

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 26 Dec 2011, 07:57 AM
Hello,
Try the following.
JS:
<script type="text/javascript">
  function OnClientBeforeShow(sender, args)
  {
     var label1 = document.getElementById("Label1");
     var linkbutton = document.getElementById("LinkButton1");
     var label2 = document.getElementById("Label2");
  }
</script>

Thanks,
Princy.
0
Svetlina Anati
Telerik team
answered on 26 Dec 2011, 01:50 PM
Hello Justin,

If you are using RadToolTipManager with Load On Demand, the content controls will not be added to the page until the response of the request. If you are simply using a separate RadToolTip control, you can directly use $get or $find to find the corresponding HTML elements or client objects. please, note, that if you have an INaming Container you should evaluate the actual client ID but the tooltip itself is not changing the IDs.

In case you need further assistance, please provide some runnable code along with detailed explanations and I will modify it in order to meet your requirements.
 

Kind regards,
Svetlina Anati
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
JustinWong
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Svetlina Anati
Telerik team
Share this question
or