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

Potential bug with UpdatePanel and firefox

5 Answers 88 Views
FormDecorator
This is a migrated thread and some comments may be shown as answers.
Michael Onstad
Top achievements
Rank 1
Michael Onstad asked on 01 May 2008, 09:46 PM
I have a button inside an UpdatePanel with an OnClick Event set that updates a DataList.

If I use the RadFormDecorator to style my button, the Click event doesn't seem to work under FireFox. As soon as I take the RadFormDecorator out, my button works as expected under firefox.


5 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 07 May 2008, 01:04 PM
Hi Michael,

Thank you for bringing this issue to our attention. We investigated it and here are our findings:

  1. The problem does not exist if UpdatePanel is not used.
  2. The setup works under IE in all cases.
  3. Ultimately the reason for the problem is in the Firefox implementation. It can be reproduced if no RadControls are used as well.
Here is a sample setup that reproduces the problem without RadFormDecorator - it actually represents how the RadFormDecorator works. When you click a "decorated" button, RadFormDecorator finds the corresponding real button and call its click() method:
<asp:ScriptManager ID="ScriptManager1" runat="server"
</asp:ScriptManager> 
<asp:UpdatePanel ID="panel1" runat="server"
    <ContentTemplate> 
        <script type="text/javascript"
            function submitForm() 
            { 
                var input = $get("<%=Button1.ClientID %>");                 
                input.click(); 
            } 
        </script> 
        <button onclick="submitForm();return false;"
            Click to submit</button> 
        <asp:Button ID="Button1" runat="server" Text="test" OnClick="Button1_Click" /><asp:Label 
            ID="lbl1" runat="server"></asp:Label> 
    </ContentTemplate> 
</asp:UpdatePanel> 

The good news is that there is an easy solution for this case - you only need to set the button's UseSubmitBehavior property to false (it is true by default). Then the button will be rendered as <input type="button" .. element and everything will work as expected.


Sincerely yours,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Edvin
Top achievements
Rank 1
answered on 23 Sep 2008, 09:32 AM
Is this the only solution, because UseSubmitBehaviour can't be set in skin file so you have to change manually every button and be careful with new one.

txt
edvin
0
J.A.
Top achievements
Rank 1
answered on 26 Feb 2009, 10:13 AM
Thanks for that solutions , it works with me.
0
stevied
Top achievements
Rank 2
answered on 21 Oct 2010, 09:36 AM
I am having an identical issue but i'm using an imagebutton to switch a panel on which contains 5 radeditors which are not displaying correctly. If i cancel the panel then switch it on again the radeditors display properly.

THe UseSubmitBehavior solution is not working for me...any other way to solve this.  Again this is only in Firefox and Chrome.

Regards,

Stephen
0
Georgi Tunev
Telerik team
answered on 22 Oct 2010, 12:39 PM
Hi Stephen,

I am not sure that your scenario is related to this problem, but to be able to help, we will need to take a closer look on your exact setup and logic. Please open a support ticket and send us a sample project - we will check it right away.

Regards,
Georgi Tunev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
FormDecorator
Asked by
Michael Onstad
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Edvin
Top achievements
Rank 1
J.A.
Top achievements
Rank 1
stevied
Top achievements
Rank 2
Share this question
or