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

Tooltip show on Blur

4 Answers 141 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Feizal Amlani
Top achievements
Rank 1
Feizal Amlani asked on 07 Jun 2010, 11:38 PM
Hello,

I am looking for an example where I can show a tooltip when I leave a textbox.  (onblur)

I have a tooltip defined as in one of your examples.  However, it fires onmouseover.  How do I change to have control on when it fires.
 

<telerik:RadToolTip ManualClose="true"
ID="RadToolTip1"
Skin="Vista"
runat="server"
TargetControlID="txtPartyName">
Rich content:
<asp:Button ID="btnA" runat="server" Text="Button in a ToolTip"/>
</telerik:RadToolTip>

<asp:TextBox ID="txtPartyName" runat="server" onblur=????></asp:TextBox>

Thanks,
Feizal

 

 

 

 

 

 

 

 

 

4 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 08 Jun 2010, 08:43 AM
Hello Faizal,

It is doable from client code. Access the client object of RadToolTip in onblur event and invoke the show() method.

code:
 
<telerik:RadToolTip ManualClose="true" ShowEvent="FromCode" ID="RadToolTip2" Skin="Vista" 
    runat="server" TargetControlID="txtPartyName">  
    Rich content:  
    <asp:Button ID="btnA" runat="server" Text="Button in a ToolTip" /> 
</telerik:RadToolTip> 
<asp:TextBox ID="txtPartyName" runat="server" onblur="showToolTip();"></asp:TextBox> 
 
<script type="text/javascript">  
    function showToolTip() {  
        var tooltip = $find('<%= RadToolTip2.ClientID %>');  
        tooltip.show();  
    }  
</script> 


Cheers,
Princy.
0
Feizal Amlani
Top achievements
Rank 1
answered on 08 Jun 2010, 08:40 PM
Thanks Princy,

That worked fine.  However, I have set the tooltip with the following properites...

<telerik:RadToolTip ManualClose="true" ID="RadToolTip1" Skin="Vista" runat="server" Width="250px" Height="100px" Animation="Slide"
     RelativeTo="Element" ShowCallout="true" TargetControlID="txtPartyName" Position="BottomCenter" ShowEvent="FromCode"
     Title="Similar Party Matches(tr)">
    <br />
    <asp:Label runat="server" Text="Similar Party Matches(tr)" ID="lblSimilarPartyMatches"></asp:Label>
</telerik:RadToolTip>

It seems when the tooltip opens it display away from the Element and then quickly puts itself into position under the element which is the intended behaviour.  The tooltip jumps from one location to the correct location under the element.  Any ideas what is causing this?

Thanks,
Feizal
0
Princy
Top achievements
Rank 2
answered on 09 Jun 2010, 09:06 AM
Hello Faizal,

I am not sure about the behaviour that you described. The code worked well in my end (my RadControls version - 2010, 1, 309). Can someone from Telerik give us a hand?

Thnaks,
Princy.


0
Svetlina Anati
Telerik team
answered on 10 Jun 2010, 03:33 PM
Hello guys,

I also tested the code and it worked fine on my side as well with the version you have selected - 2010.1.519. What I can assume is that the issue comes from parent elements of the tooltip and if this is the case I recommend to set RenderInPageRoot="true" and test again. More information about this property is available below:

http://demos.telerik.com/aspnet-ajax/tooltip/examples/tooltipasformchild/defaultcs.aspx

In case this does not help, please prepare a fully runnable page, open a new support ticket and send it to me and I will do my best to help.

Best wishes,
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
Feizal Amlani
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Feizal Amlani
Top achievements
Rank 1
Svetlina Anati
Telerik team
Share this question
or