Contents
Advantages of telerik AJAX framework
Licensing
Installation and deployment
DNN
AJAX Manager
AJAX Panel
AJAX Loading Panel
AJAX Timer
WebServiceManager
How-to
Performance tips and tricks
Troubleshooting
Client-side
Client-side Events
Client-side How-To
API Reference
|
|
| OnRequestStart |
Send comments on this topic. |
| See Also |
|
Client-side > Client-side Events > OnRequestStart |
|
Fired by |
This event is fired when a request to the server is started. |
|
Arguments |
sender - this is the instance of the client-side RadAjaxManager/RadAjaxPanel object arguments
- arguments.XMLHttpRequest - get the XMLHttpRequest object. You can cancel it with xmlHttpRequest.abort(); - arguments.EventTarget - the UniqueID of the element that had raised the request - arguments.EventArgument - the second parameter of the original __doPostback function - arguments.EventTargetElement - an instance of the client-side object that had raised the AJAX request - arguments.EnableAjax - an AJAX request is performed if this is true. Otherwise a normal post-back is performed. |
|
Can be canceled |
Yes, return false.
If you want to perform post-back instead of AJAX request, arguments.EnableAjax should be false. |
|
Example |
In the example shown below, the JavaScript function is defined in the html form. To execute them you should then set the corresponding ClientEvent property to the name of the JavaScript function.
The javascript function for implementing the OnRequestStart event looks like this:
| ASPX |
Copy Code |
|
<script type="text/javascript">
function onRequestStart(sender, arguments) { alert( 'AJAX request has just started.'); };
<rad:RadAjaxManager id="RadAjaxManager1" runat="server"> <ClientEvents OnRequestStart="onRequestStart"></ClientEvents> </rad:RadAjaxManager> |
|
|
Remarks |
Telerik RadAjax controls provide client events which allow you to execute JavaScript code on the client at different stages of the AJAX request. This functionality gives you more flexibility in completing complex tasks in your project.
To implement this functionality, you need to define the custom JavaScript functions you want to use, and then call them from code-behind using the ClientEvents property of the control. |
See Also
|