Hi
I have a radajaxloading panel with a cancel button in it which has a javascript event as
function AbortAllPostbacks() {
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.abortPostBack();
}
Even if I click that button to cancel ajax the request ,
page gets a whole postback after some time and I lose my dynamically created controls in radajax panels.
How can I avoid this?
Is there a way to stop server side execution?
Thanks.
I have a radajaxloading panel with a cancel button in it which has a javascript event as
function AbortAllPostbacks() {
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.abortPostBack();
}
Even if I click that button to cancel ajax the request ,
page gets a whole postback after some time and I lose my dynamically created controls in radajax panels.
How can I avoid this?
Is there a way to stop server side execution?
Thanks.
5 Answers, 1 is accepted
0
Hello Aykut,
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
You can cancel an AJAX request in the OnRequestStart client-side event handler of your RadAjaxManager/RadAjaxPanel. Calling set_cancel(true) prevents the request from continuing.
You could review the following articles, which elaborates on this matter
Cancel AJAX request
Online Demo
Best wishes,
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Aykut
Top achievements
Rank 1
answered on 15 May 2009, 08:56 PM
Thanks for your reply but your scenario is for checking something on request start and cancel it if it doesn't meet the requirements.
Mine is, canceling an already started and ongoing ajax request. I need that for long running requests, user might want to change his/her parameters if the running query is very long.
Regards.
Mine is, canceling an already started and ongoing ajax request. I need that for long running requests, user might want to change his/her parameters if the running query is very long.
Regards.
0
Hello Aykut,
Note that when a an ajax request is performed, the page lifecycle is not affected. All events are fired and handlers are executed the same way as in case of regular postback. If you could cancel regular request to the server, you could do it the same way with ajax request.
Kind regards,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Note that when a an ajax request is performed, the page lifecycle is not affected. All events are fired and handlers are executed the same way as in case of regular postback. If you could cancel regular request to the server, you could do it the same way with ajax request.
Kind regards,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Aykut
Top achievements
Rank 1
answered on 18 May 2009, 03:44 AM
So does this mean you cannot stop a request being returned to browser?
Any idea how the stop or cancel button of a browser works? Maybe I should imitate that.
Thanks for your help.
Any idea how the stop or cancel button of a browser works? Maybe I should imitate that.
Thanks for your help.
0
Hello Aykut,
I am not sure how you could replicate the stop button functionality.
You could refer to the following link and see if this works for you:
http://forums.devshed.com/javascript-development-115/replicating-browser-stop-button-with-javascript-318994.html
Best wishes,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
I am not sure how you could replicate the stop button functionality.
You could refer to the following link and see if this works for you:
http://forums.devshed.com/javascript-development-115/replicating-browser-stop-button-with-javascript-318994.html
Best wishes,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.