ToolTip

4 posts, 0 answers
  1. Nithya Rani
    Nithya Rani avatar
    47 posts
    Member since:
    Oct 2012

    Posted 05 Mar 2012 Link to this post

    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
  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 07 Mar 2012 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Nithya Rani
    Nithya Rani avatar
    47 posts
    Member since:
    Oct 2012

    Posted 07 Mar 2012 Link to this post

    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,
  5. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 09 Mar 2012 Link to this post

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