Thanks for pointing me in the right direction! Jesse
On Wed, Dec 10, 2008 at 2:51 PM, Jerome (Guru) <[EMAIL PROTECTED]>wrote: > > Hi Jesse, > > Oh, ok, now I see your issue. I was able to reproduce the problem from > my side too. Yes, looks like the fetch is failing consistently... I > can not provide any explanation why this is returning you a 404. This > could be Google preventing the fetch, or the site not wanted to return > data to the iGoogle fetchers... > > Anyway, I thought of another option for you: why not make your canvas > view in the mode url, not html? This way, the site you want ot allow > to browse is simply rendered by the browser in the canvas iframe. > Just replace your canvas section with the following: > <Content view="canvas" type="url" href="__UP_fasturl__" /> > > I have verified that this work and put the test online for > convenience: > http://www.ljmsite.com/google/gadgets/tests/iBrowser01.xml > > If you are worried about users not adding the proper http:// at the > beginning of the fasturl, this would be fairly simple to add in the > non canvas view some code to set the preference with the corrected URL > format, this way this will ensure your substituted canvas href is a > valid URL. > > I hope this help. > > Jerome > > On Dec 10, 4:19 pm, "Jesse Varnado" <[EMAIL PROTECTED]> wrote: > > The gadget's purpose is to provide the user with an interface similar to > the > > start page in Google Chrome or the fast dial in Opera. The thumbnail > > provides context for the link through the thumbnail. In addition the > gadget > > allows the user to browse the site from within iGoogle by switching to > the > > canvas view. This is where the problem arises. I am using the > > gadgets.io.makeRequest() to capture the url's html content and display it > > within the canvas of the gadget. However when the request > towww.engadget.comcomes back it states that there was a 404 error. > > > > Any thoughts? > > > > Thanks! > > Jesse > > > > On Tue, Dec 9, 2008 at 2:02 PM, Jerome (Guru) <[EMAIL PROTECTED] > >wrote: > > > > > > > > > Hi Jesse, > > > > > I added your gadget to my iGoogle page on the sandbox, and it worked > > > fine for me. I was able to set the URL tohttp://www.nytimes.comand > > >http://www.engadget.comand see related bitmap from > > >http://www.shrinktheweb.com. > > > > > Have you addressed a problem you had earlier with the URL handling? Or > > > maybe there was a transient problem on the sandbox? > > > > > Jerome > > > > > On Dec 8, 4:22 pm, Jesse Varnado <[EMAIL PROTECTED]> wrote: > > > > Thanks for the response! > > > > > > You can access my gadget athttp:// > > >www.google.com/ig/directory?hl=en&url=fastdial.googlecode.com%... > > > > > > I am running the gadget in the sandbox. > > > > > > Thanks, > > > > Jesse > > > > > > On Dec 6, 2:38 pm, "Jerome (Guru)" <[EMAIL PROTECTED]> wrote: > > > > > > > Hi Jesse, > > > > > > > I don't see anything wrong with your code. If you are getting the > HTML > > > > > content properly for some sites with this same code, then this is > > > > > pretty much a confirmation that your fetcher is working as > expected. > > > > > > > If you are still having an issue, it would be great if you could: > > > > > - post the URL to your test gadget here - this would make it easier > > > > > for others to test this out and possibly see what could be going > > > > > wrong, rather than having to copy and paste > > > > > - specify where your gadget is running: iGoogle production, iGoogle > > > > > sandbox, other gadget platform? > > > > > > > I have been successful with using the Engadget RSS feed using the > > > > > legacy API _IG_FetchFeedAsJSON('http://www.engadget.com/rss.xml > ',...) > > > > > so you could be using this option rather than hitting the Engadget > > > > > mainpage and then parsing the content. But, I don't see why > fetching > > > > > the Engadget (or New York Times) would fail with a 404. They have > no > > > > > reason to turn away the Google fetchers, as this could lead to > their > > > > > content indexing being impacted. > > > > > > > Thanks, > > > > > > > Jerome > > > > > > > On Dec 4, 7:06 pm, Jesse Varnado <[EMAIL PROTECTED]> wrote: > > > > > > > > My gadget is receiving 404 responses from calls to > > > > > > gadgets.io.makeRequest with commonly used urls (e.g. > > >http://www.nytimes.com,http://www.engadget.com). Other urls work fine, > > > however sub pages > > > > > > within these problem domains also do not work. Is this due to > these > > > > > > domains blocking requests from google.com? Or is there something > > > wrong > > > > > > with my code (shown below)? Any help is appreciated! > > > > > > > > <Content type="html" view="canvas"> > > > > > > <![CDATA[ > > > > > > <div id='content_div'></div> > > > > > > <script type="text/javascript"> > > > > > > var url; > > > > > > function onLoadHand () { > > > > > > var params = {}; > > > > > > params > > > > > > [gadgets.io.RequestParameters.CONTENT_TYPE] = > > > > > > gadgets.io.ContentType.TEXT; > > > > > > var prefs = new gadgets.Prefs(); > > > > > > url = prefs.getString("fasturl"); > > > > > > var pattern = new RegExp("http\:\/\/"); /* > > > > > > Remove http:// from the url */ > > > > > > url = url.replace(pattern, ""); > > > > > > url = "http://" + url; > > > > > gadgets.window.adjustHeight(window.outerHeight*. > > > > > > 50); > > > > > > gadgets.io.makeRequest(url, response, > params); > > > > > > } > > > > > > > > function response(obj) { > > > > > > //obj.text contains the text of the page that > was > > > > > > requested > > > > > > var html = obj.text; > > > > > > if (html == null || html == "") { > > > > > > html = "<h1 style='{text-align: > > > > > > center}'>Page Cannot Be Displayed</h1><div style='{text-align: > > > > > > center}'>" > > > > > > + obj.errors + "</ > > > > > > div>"; > > > > > > document.getElementById > > > > > > ('content_div').innerHTML = html; > > > > > > return; > > > > > > } > > > > > > /* v2.0 resolves relative urls */ > > > > > > var pattern = new RegExp("href=\"\/", > > > > > > "gm"); > > > > > > html = html.replace(pattern, "href=\"" + url > + > > > > > > "\/"); > > > > > > > document.getElementById('content_div').innerHTML > > > = > > > > > > html; > > > > > > } > > > > > > gadgets.util.registerOnLoadHandler(onLoadHand); > > > > > > </script> > > > > > > ]]> > > > > > > </Content> > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
