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

AjaxManager PartialAjax fire javascript responseEnd

4 Answers 58 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Rich
Top achievements
Rank 1
Rich asked on 10 Sep 2009, 10:32 PM
Hi there,

I have an ajaxmanager on my page. Inside i created a setting for  asp:button's onclick event use a callback

<

 

telerik:AjaxSetting AjaxControlID="BtnEmailChart">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="RdMenuToolBarForChart" LoadingPanelID="RadAjaxLoadingPanel1" />

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 


Onclick of the button an email is sent. What i would like to do is once the callback is done i would like to open a radalert indicating the message was sent.

I tried onresponseend for the ajaxmanager and notice that the ajax for the button does not fire this event. None of the partial ajaxification scenarios do... by design?

Anyway is there a solution here? How can i fire some javascript when the response ends for the above callback? thanks!

4 Answers, 1 is accepted

Sort by
0
ATS
Top achievements
Rank 1
answered on 11 Sep 2009, 08:31 PM
I think Telerik might have accidentally broken this on a recent build. I just noticed OnRequestStart events aren't firing anymore either. Very uncool, as that's the only way to turn off AJAX for a file upload when the user clicks the Upload button.
0
Rich
Top achievements
Rank 1
answered on 14 Sep 2009, 12:32 PM
Basically i'm trying to update a panel in a custom template inside a RadMenu.

So the problem is the parent control is trying to update a child panel inside itself.. Apparently you cannot target anything but the parent to be updated.

Although I can actually get this to work.. but adding more than one ajax setting for child controls inside the menu breaks it.

0
ATS
Top achievements
Rank 1
answered on 14 Sep 2009, 03:59 PM
The issue I've run into is that OnRequestEnd and OnRequestStart only fire if the control that initiates postback is specified as an updated control. Try this:

<Telerik:RadAjaxManager ID="ramMain" runat="server"
     <ClientEvents OnRequestStart="ramMain_RequestStart" /> 
     <AjaxSettings> 
          <telerik:AjaxSetting AjaxControlID="BtnEmailChart"
               <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RdMenuToolBarForChart" LoadingPanelID="RadAjaxLoadingPanel1" /> 
               </UpdatedControls> 
          </telerik:AjaxSetting> 
          <telerik:AjaxSetting AjaxControlID="BtnEmailChart"
               <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="BtnEmailChart" /> 
               </UpdatedControls> 
          </telerik:AjaxSetting> 
     </AjaxSettings> 
</Telerik:RadAjaxManager> 

0
Iana Tsolova
Telerik team
answered on 15 Sep 2009, 11:46 AM

Hi,

I followed your steps and prepared a sample project attached to this post. You can see that the OnRequestStart and the OnResponseEnd events are fired properly there. I also tried illustrating how you can show an alert when the ajax request is finished.

I hope this helps.
All the best,

Iana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Ajax
Asked by
Rich
Top achievements
Rank 1
Answers by
ATS
Top achievements
Rank 1
Rich
Top achievements
Rank 1
Iana Tsolova
Telerik team
Share this question
or