ratotator's click event not working on firefox

3 posts, 0 answers
  1. Teoman
    Teoman avatar
    69 posts
    Member since:
    Jan 2009

    Posted 02 Oct 2011 Link to this post

    I design image galery with rotator.i test it on ie its working.but click event doesnt work on firefox?Any opinion?

     protected void ShowImage(object sender, RadRotatorEventArgs e)
            ImageButton img = e.Item.FindControl("ImageButton1") as ImageButton;
            Image1.ImageUrl = img.ImageUrl;
     <telerik:RadRotator ID="RadRotator1" runat="server" DataSourceID="EntityDataSource1"
                Width="100%" RotatorType="Buttons" Skin="Vista" Height="70px" OnItemClick="ShowImage">
                    <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl='<%#DataBinder.Eval(Container.DataItem, "CARDURL")%>'
                        Width="70px" Height="70px"/>
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 03 Oct 2011 Link to this post

    Hello Teoman,

    Check the following article which describes about a fix for radrotator's click event not working in Firefox.
    Fix for Firefox click() event issue

  3. Slav
    Slav avatar
    1359 posts

    Posted 05 Oct 2011 Link to this post

    Hi Teoman,

    The server-side event OnItemClick of the RadRotator is not handled because the ImageButton inside the ItemTemplate initiates postback. To alter this behavior, you can configure the following property of the ImageButton control so that it does not perform postback when clicked:
    <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl='<%#Eval("CustomerID", "~/Img/Northwind/Customers/{0}.jpg")%>' Width="70px" Height="70px" OnClientClick="return false;" />

    Another option is to replace the ImageButton with an ASP Image control, since in your scenario you don't need the button functionality.

    All the best,
    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