Onclick and MouseOver

4 posts, 0 answers
  1. Quan Nguyen
    Quan Nguyen avatar
    8 posts
    Member since:
    Aug 2009

    Posted 04 Sep 2009 Link to this post

     

    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>

     

  2. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 07 Sep 2009 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Quan Nguyen
    Quan Nguyen avatar
    8 posts
    Member since:
    Aug 2009

    Posted 09 Sep 2009 Link to this post

    Thanks Svetlina! I really appreciate you help.

    Quan
  5. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 10 Sep 2009 Link to this post

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