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

Onclick and MouseOver

3 Answers 98 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Quan Nguyen
Top achievements
Rank 1
Quan Nguyen asked on 04 Sep 2009, 08:47 PM

 

Hello,

My goal is to have a list of thumbnail images, on "onMouseOver" event it will show the tooltip (working).
However, when the user click on the image (div) then display a larger/print size image. I've tried various things such as by adding the onclick event in the div tag with no success.
Please advise.

Thanks,
Quan



Here's the code snippet:

<
telerik:RadToolTipManager runat="server" ID="RadToolTipManager1" Width="700px"

 

 

Height="370px" RelativeTo="Element" Animation="Slide" Position="BottomCenter"

 

 

OnAjaxUpdate="OnAjaxUpdate"

 

 

HideEvent="LeaveTargetAndToolTip" AutoCloseDelay="15000" />

 

 

 

<asp:Repeater ID="Repeater1" runat="server" OnItemDataBound="Repeater1_ItemDataBound">

 

 

<ItemTemplate>

 

 

 

<div style="float: left; text-align: center;" id="smallImage" runat="server">

 

 

<div style="border: 1px solid #999999; margin: 5px; width: 100px; height: 100px; background-position: center; background-repeat: no-repeat; background-image: url('<%# Eval("Thumbnail", "../../../Images/Thumbs/{0}") %>');">

 

 

</div>

 

 

</div>

 

 

</ItemTemplate>

 

 

</asp:Repeater>

 

3 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 07 Sep 2009, 03:07 PM
Hello Quan,

What I can suggest is to put a separate RadToolTip control with static content in the ItemTemplate and leave its ShowEvent to be OnMouseOver and to use additionally the manager in the way you have done so far but use it for LOD loading of the image and set the ShowEvent to be OnClick. In this manner, on hover the separate tooltip will show and onclick - the generated by the manager one will show. I believe that this is the easiest and most clear implementation for the case. Let me know whether this works for you.


Best wishes,
Svetlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Quan Nguyen
Top achievements
Rank 1
answered on 09 Sep 2009, 04:32 PM
Thanks Svetlina! I really appreciate you help.

Quan
0
Svetlina Anati
Telerik team
answered on 10 Sep 2009, 01:33 PM
Hello Quan,

I am glad that my suggestion worked for you. In case you need further assistance, do not hesitate to contact us again!

Best wishes,
Svetlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
ToolTip
Asked by
Quan Nguyen
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Quan Nguyen
Top achievements
Rank 1
Share this question
or