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

ratotator's click event not working on firefox

2 Answers 54 Views
Rotator
This is a migrated thread and some comments may be shown as answers.
Teoman
Top achievements
Rank 1
Teoman asked on 02 Oct 2011, 01:49 PM
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 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 03 Oct 2011, 06:40 AM
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.
0
Slav
Telerik team
answered on 05 Oct 2011, 09:20 AM
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
Tags
Rotator
Asked by
Teoman
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Slav
Telerik team
Share this question
or