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

OnClick not firing in Firefox... under specific conditions

3 Answers 332 Views
Button
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 1
Dan asked on 26 Jul 2013, 08:13 PM
I have a page that runs in a RadWindow.  There is a RadButton on this page, that has both an OnClientClicking event (which sets a Tab control index) and an OnClick event which fires logic on the server through the RadAjaxManager.

In Chrome and IE, the OnClientClicking fires, then the OnClick makes the postback.

On Firefox however, the OnClientClicking is the end of the line.  OnClick does not get fired.

If I run this same page directly, instead of from the RadWindow - it works as expected in FireFox...

This is my OnClientClicking routine - pretty simple - I can't see why Firefox would stop.  I get no errors in the Console, etc...

function setResultsTab(sender, args)
{
    var tabStrip = $find('<%=tabCriteria.ClientID%>');
    var tab = tabStrip.findTabByValue('1');
    tab.select();
}
<telerik:RadButton ID="bAdvancedSearch" runat="server" Text="Search" SkinID="defaultButtonLargeSearch"
    OnClick="click_AdvancedSearch" meta:resourcekey="bAdvancedSearchResource2" OnClientClicking="setResultsTab"/>

3 Answers, 1 is accepted

Sort by
0
Danail Vasilev
Telerik team
answered on 31 Jul 2013, 12:52 PM
Hello Dan,

I have tried to reproduce the unexpected behavior but to no avail. Could you please watch a short video test in the attached archive and then tell me what I am missing?

Could you also confirm whether you are using the latest official version of RadControl - 2013.2.717, and if not does upgrading to it resolve the issue? I am asking about that because in previous version of RadControls there was a similar issue of RadButton's OnClick event triggering in specific browsers.

If the above information, however, is not helpful, could you please try to reproduce the unexpected behavior with the attached VS example and then tell us what changes you have made, so that we can make an investigation locally?


Regards,
Danail Vasilev
Telerik
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 the blog feed now.
0
Randy
Top achievements
Rank 1
answered on 13 Aug 2013, 08:30 PM
Dan asked me to follow up with this.

The problem only happens in Firefox and ONLY when you are in a RadWindow - not the main page.  The example provided doesn't appear to use RadWindow, so I expect it to function just fine.  The server event OnClick will not fire if either of the client side events - OnClientClicked or OnClientClicking are present.  I did find a work around.  If you set the button to UseSubmitBehavior="false", it functions in all of the browsers as expected.

Any idea why this is the case?  And is there any reason that we shouldn't always set the submit behavior to false?

-Randy
0
Danail Vasilev
Telerik team
answered on 16 Aug 2013, 12:53 PM
Hello Randy,

I have tried loading a page with a RadButton inside RadWindow through the NavigateUrl property of the RadWindow and it seems that events of the RadButtons are working properly on my side. You can watch the short video with the test in the attached archive and then tell me what I am missing.

Could you also tell us whether your version of RadControls is the latest one - 2013.2.717 and if not does upgrading to it resolve the issue?

Regarding the UseSubmitBehavior property of the RadButton it indicates whether the button will use the browser's submit mechanism or the ASP.NET postback mechanism. More information on the matter can be found in this help article.


Regards,
Danail Vasilev
Telerik
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 the blog feed now.
Tags
Button
Asked by
Dan
Top achievements
Rank 1
Answers by
Danail Vasilev
Telerik team
Randy
Top achievements
Rank 1
Share this question
or