Hi Amit, Currently, the _IG_Fetch functions will not allow you to fetch content that is on a protected intranet. In order to fetch files with these calls, they must be accessible to the iGoogle proxy, which is to say, they must appear, unprotected, on the internet.
Your second approach will fail when you fetch content from a different domain than that which renders the page. Gadgets on iGoogle are rendered on gmodules.com, whereas your HTML page was probably rendered on the same domain as the file you were fetching. This issue is the reason that the _IG_Fetch calls were created. A possible workaround is to use a type="url" gadget which points to an HTML page on your intranet and use xmlhttp requests to fetch your content. Best, Dan On Sep 4, 8:05 am, Amit Agrawal <[EMAIL PROTECTED]> wrote: > Hi , > I am unable to fetch the contents of the file URLs on intranet through > google gadgets. > > Tried the following ways: > 1. Using google gadgets API "_IG_FetchXmlContent" > > var url = "http://www.mycompany.com/data.xml"; > > //fetch the xml coontent > _IG_FetchXmlContent(url, function (response) { > if (response == null || typeof(response) != "object" > || > response.firstChild == null) { > _gel("content_div").innerHTML = "<i>Invalid > data.</i>"; > return; > } > > 2. Using javascript > xmlhttp.open("GET", url,true); > xmlhttp.send(null); > > The 1st approach (i.e. through google gadgets worked for contents > present on internet but failed for intranet sites (this could be due > to google gadgets server not being able to access the intranet files) > > so, I tried the second approach (i.e. through javascript) which works > fine with normal html (which i used for testing functionality) but > failed when used with gadgets. > > please help me to find out a way which works for intranet files > > Thanks in advance > Amit Agrawal --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "iGoogle Developer Forum" 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-Gadgets-API?hl=en -~----------~----~----~----~------~----~------~--~---
