Hi, Inside the Google Desktop SDK there is a XMLHttpRequest sample gadget. On the latest version of Google Desktop SDK. (version 1.1.0708.17471) Download link: http://desktop.google.com/downloadsdksubmit?hl=en
Here in this 'XMLHttpRequest' gadget it try to load a image from the internet (example Google logo). Kind Regards, Stefan Van Damme (aka Stefan vd) Gadget Developer On 6 mei, 09:42, "[email protected]" <[email protected]> wrote: > Hi people, > > I just read the article 'Interacting With The Web' by Benjamin > Schirmer and tried to load an images via XMLHttpRequest and > responseStream. > In FireBug it looks as if the images is returned, but I cannot call > the responseStream. FireBug says, that it is undefined. My code is > very simple, so maybe someone of you can help me, or has the same > problem when loading images. > > var oXMLHttpRequest = new XMLHttpRequest; > oXMLHttpRequest.open("POST", url, false); > oXMLHttpRequest.onreadystatechange = function() > { > if (this.readyState == XMLHttpRequest.OPENED) > { > console.log('opened: ' + oXMLHttpRequest.status); > } > if (this.readyState == XMLHttpRequest.HEADERS_RECEIVED) > { > console.log('headers: '+ oXMLHttpRequest.status); > } > if (this.readyState == XMLHttpRequest.LOADING) > { > console.log('loading: ' + oXMLHttpRequest.status); > } > if (this.readyState == XMLHttpRequest.DONE) > { > console.log('ready:' + oXMLHttpRequest.status); > return oXMLHttpRequest.responseStream; > } > } > oXMLHttpRequest.send(null); --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Desktop Developer Group" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Desktop-Developer?hl=en -~----------~----~----~----~------~----~------~--~---
