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 to
www.engadget.com comes 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 to http://www.nytimes.com and
> http://www.engadget.com and 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to