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

Postback occuring when calling a button's click event via javascript.

1 Answer 317 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Vance Smith
Top achievements
Rank 1
Vance Smith asked on 19 Apr 2016, 05:36 PM

Hello,

I am calling a telerik radbutton's click event via javascript from within a RadAjaxPanel and it is causing a postback rather than a call back. When I click the button manually all works as expected (a callback occurs).

Example:

document.getElementById('<% = SaveEditorButton.ClientID %>').click();

Please help.

1 Answer, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 22 Apr 2016, 01:06 PM
Hi,

Instead of calling manual click() you can simply perform manual ajaRequest() on client button click event to perform server action. Give this a try and see if it covers your requirements.

Regards,
Maria Ilieva
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
Ajax
Asked by
Vance Smith
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question
or