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

Alt of the anchor image not showing up

1 Answer 41 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Rishi
Top achievements
Rank 1
Rishi asked on 10 Jun 2014, 01:56 PM
Hi 

I have a img tag to which i am associating a RadToolTip using th ToolTip Manager using the following settings..

<telerik:RadToolTipManager ID="TestToolTip" runat="server" HideEvent="ManualClose"
MouseTrailing="false" EnableEmbeddedSkins="false" ShowCallout="true" Animation="None"
Width="500" Height="300" ContentScrolling="Y" ShowEvent="OnClick" Position="BottomRight"
Skin="Ciena" RelativeTo="Mouse" HideDelay="500">
<WebServiceSettings Method="xxx" Path="xxx" />
</telerik:RadToolTipManager>

<img id="testID" alt="View Details" runat="server" src='~/images/test1.gif' style="cursor: hand;border:0"/>

And binding the tooltip to img in the backend using

TestToolTip.TargetControls.Add(testID.ClientID, "Test", true);

The RadTooltip itself loads and shows just fine.. but we want to show title/alt text on the anchor img tag to allow users to know what the image means.. like a normal html tooltip.. i tried with both title and alt properties but they are not showing for the img.. 









1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 11 Jun 2014, 05:33 AM
Hi Rishi,

Please do the following modification in your code which works fine at my end. In order to show the Title of image as ToolTip, Please try to show the RadToolTip from JavaScript as follows.

ASPX:
<asp:Panel ID="PageContent" runat="server">
    <telerik:RadToolTipManager ID="RadToolTipManager1" runat="server" Animation="Slide"
        RelativeTo="BrowserWindow" OffsetX="20" OffsetY="20" ShowCallout="false" Position="BottomRight" Width="240px" Height="90px" ShowEvent="FromCode">
        <WebServiceSettings Method="GetMailMessagesCount" Path="ToolTipWebService.asmx">
        </WebServiceSettings>
        <TargetControls>
            <telerik:ToolTipTargetControl TargetControlID="PageContent" Value="1"></telerik:ToolTipTargetControl>
        </TargetControls>
    </telerik:RadToolTipManager>
    <img id="testID" title="View Details" alt="View Details" runat="server" src="~/Images/Black_Plus.png" onclick="CheckMessageCount(this); return false;" style="cursor: hand; border: 0" />
</asp:Panel>

JavaScript:
<script type="text/javascript">
    function CheckMessageCount() {
        $find("<%=RadToolTipManager1.ClientID %>").get_tooltips()[0].show();
    }
</script>

Thanks,
Princy.
Tags
ToolTip
Asked by
Rishi
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or