Find elements within toolTip client side

3 posts, 0 answers
  1. JustinWong
    JustinWong avatar
    147 posts
    Member since:
    Mar 2007

    Posted 25 Dec 2011 Link to this post

    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. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 26 Dec 2011 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 26 Dec 2011 Link to this post

    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
Back to Top