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

    Hi,
    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">
                <ItemTemplate>
                    <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl='<%#DataBinder.Eval(Container.DataItem, "CARDURL")%>'
                        Width="70px" Height="70px"/>
                </ItemTemplate>
            </telerik:RadRotator>
  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

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Slav
    Admin
    Slav avatar
    1355 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,
    Slav
    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