It's all about the answers!

Ask a question

dojo xhrget

xx xx (461616) | asked Mar 29 '11, 10:25 a.m.
I am trying to use dojo.xhrGet . I tried like this. But it doesn't get content from url. how can i fix it ?

(function() {
// let's call the ajax url now so we can update the page
var value2;
dojo.xhrGet( { //
// The following URL must match that used to test the server.
url: "",
handleAs: "text",

timeout: 5000, // Time in milliseconds

// The LOAD function will be called on a successful response.
load: function(response, ioArgs) { //
value2 = response; //
return response; //

// The ERROR function will be called in an error case.
error: function(response, ioArgs) { //
console.error("HTTP status code: ", ioArgs.xhr.status); //
value2 = 'error'; //
return response; //

dojo.declare("com.example.common.ExposureProvider", null, {

getValue: function(attribute, workItem, configuration) {
var value= value2;

return value;



Alicia McPherson commented Jun 06 '12, 4:20 p.m.

I'm trying to use dojo.xhrGet to get the content of a file in RTC, but I'm getting an error as well. Was there a solution for this problem?

Here's my error: Error invoking default value provider '...'


Dimitrios Dentsas commented Dec 06 '13, 1:19 a.m.

It seems I'm a little late to the party but I would also like to know if there was any solutions to that after all.

Be the first one to answer this question!

Register or to post your answer.