Opened 12 years ago

Closed 12 years ago

#6838 closed defect (invalid)

Handling timeouts in AJAX

Reported by: guest Owned by: anonymous
Priority: high Milestone:
Component: Core Version: 1.1.1
Keywords: Cc:
Blocked By: Blocking:

Description

I am using dojo.xhrGet to execute a AJAX Call.

url: ajaxUrl, handleAs: "json", timeout: 5000

Sometimes the AJAX request is unable to complete in 5 sec because server takes too long. On completion of AJAX call i need to populate innerHTML of some nodes based on AJAX Response. Currently due to time out...the Node remain blank.

Would it help if I added a "synh:true" with my call so as to make sure that no matter how long server takes to respond, the result is captured.

Change History (2)

comment:1 Changed 13 years ago by itorrey

(In [6857]) adding polished radio and checkbox buttons refs #6838

comment:2 Changed 12 years ago by alex

Resolution: invalid
Status: newclosed

You should be able to add an error handler to your request and then check for the error type using the error object's "dojoType" attribute which will be set to "timeout". Not a bug.

Note: See TracTickets for help on using tickets.