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

Handling/suppresing request errors

3 Answers 67 Views
XmlHttpPanel
This is a migrated thread and some comments may be shown as answers.
Carl
Top achievements
Rank 1
Carl asked on 11 Sep 2009, 02:26 PM
Hi there,

I have a panel that polls a web service regularly for updates. If there is some sort of communication error to the server I get a javascript error message saying that the method could not be called. Is there a way to supress this at all or capture it in some way and handle the exception manually?

Thanks v much, Carl

3 Answers, 1 is accepted

Sort by
0
Accepted
Svetlina Anati
Telerik team
answered on 14 Sep 2009, 08:49 AM

Hi Carl,

We have added a  client event to the XmlHttpPanel (OnClientResponseError) that will be raised in case of  errors and can handle them there. If you want e.g to cancel the alert message you get for teh error and call your own custom message instead you should use the following code:

 
 function OnClientResponseError(sender, args)      
{      
        args.set_cancelErrorAlert(true)    
        alert('My custom message here');       
}         
   

Let us know if you need furtehr assistance or if you have additional questions.



All the best,

Svetlina
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.
0
Mikael Kleinwort
Top achievements
Rank 1
answered on 16 Sep 2009, 07:45 AM
Hello Svetina,

I am using a XmlHttpPanel inside of a user control in SiteFinity. The Telerik.Web.UI.dll version is 2009.2.701.35.

I try to use the OnClientResponseError client event described by you but it does not seem to work. This client event is not shown in the list of properties of the panel, and when I specify it anyway in the controls markup, it does not fire.

What am I doing wrong?

by the way, where can I get information about the event arguments? The documentation for this control is kind of incomplete.

regards, Mikael
0
Svetlina Anati
Telerik team
answered on 18 Sep 2009, 01:50 PM
Hello Mikael,

The mentioned event was added in the 2009.2 826 of the RadXmlHttpPanel and thus in order to use it you should upgrade to it.

As to the arguments and their properties and methods, you can find them listed below:

http://www.telerik.com/help/aspnet-ajax/radxmlhttppanel-client-side.html


Greetings,
Svetlina
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
XmlHttpPanel
Asked by
Carl
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Mikael Kleinwort
Top achievements
Rank 1
Share this question
or