dojo xhrget
![]()
I am trying to use dojo.xhrGet . I tried like this. But it doesn't get content from url. how can i fix it ?
dojo.provide("com.example.common.ExposureProvider"); (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: "http://www.vogella.de/articles/AjaxwithDojo/download/includeTextFile.txt", 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; } }); })(); |
Be the first one to answer this question!
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.
Comments
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 '...'
Thanks!
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.