Hi Sam,

Now that you have put together the gadget, as this does not do what
you expect, you need to debug and understand what is actually
happening.

To debug your code, if you don't have it already you should install
the Firebug addon to Firefox. Or, you can use Chrome which has this
feature built in. Open your gadget on a full page (by finding the
gmodules.com URL with parameters for the iframe your gadget is
rendered in, for instance:
http://153.gmodules.com/ig/ifr?view=home&url=http://cool.gagdets.googlepages.com/celebrity.xml&nocache=0&lang=en&country=us&.lang=en&.country=us&synd=ig&mid=153&ifpctok=123456789&parent=http://www.google.com&extern_js=/extern_js/f/CgJlbhICdXMrMAY4ACwrMAo4ACwrMBA4ACwrMBI4ACwrMBM4ACwrMBU4ACw/XXYQs9Nokj0.js

Add break points where you want to see what is going on and refresh
your page and follow along in the debugger.

You will noticed you have an error here:
xmlDoc is undefined
[Break on this error] var items = xmlDoc.getElementsByTagName("item");

You will need to research in your feed why you do not get anything in
xmlDoc. Is the feed not a valid XML document (go check online with
validators)? You might want to try instead of the fetch XML function
to use the fetch JSON. This is usually an easier solution when just
having to deal with a feed, as long as you can get the information you
want in the few standard feed attributes supported by this higher
level API. More info available here:
http://code.google.com/apis/gadgets/docs/legacy/remote-content.html

I hope this helps. Happy debugging and coding.

Jerome

On Feb 24, 12:01 pm, sam <[email protected]> wrote:
> Hi jerome,
> i had written to you 4 days back, but didnt recieve reply from you.i
> want to know that the xml i sent to you can be used or not.
> please reply
> sam
>
> On Feb 20, 7:42 pm, sam mak <[email protected]> wrote:
>
> > Hi jerome
> > i found xml of random photos from feeds made by Dan ,but when i
> > modified it to incorporate msn celebrity pictures feed,it is not
> > working. can u help?
> > code is hosted athttp://cool.gagdets.googlepages.com/celebrity.xml
>
> > On 2/15/09, Jerome (Guru) <[email protected]> wrote:
>
> > > Hi Sam,
>
> > > I am not sure how your proceeded to search for a sample gadget, but I
> > > went to the directory, search for "most users" with the keyword
> > > "pictures", and the 2nd gadget on the list is something similar, which
> > > fetches a list pictures (not in RSS format in this example though):
> > >http://dailypuppy.com/gmod/thedailypuppy.xml
>
> > > Number 5 on the list is also a good example:
> > >http://olivier.camard.free.fr/google/modules/nasapics.xml
> > > but here the gadget fetches a webpage and extract the information
> > > (scrapping).
>
> > > Number 6 on the list is very close to what you want, given this is
> > > working with a feed as the remote content:
> > >http://vurdlak.googlepages.com/mightygadget.xml
>
> > > This was just by looking at the top 6 gadgets based on the keyword
> > > "pictures". You will fine 1000s more.
>
> > > You will want to check this specific section of the documentation to
> > > understand better how working with remote content works:
> > >http://code.google.com/apis/gadgets/docs/legacy/remote-content.html
>
> > > I hope this helps.
>
> > > Jerome
>
> > > On Feb 14, 4:56 am, sam mak <[email protected]> wrote:
> > >> i did search for similar gadgets but could'nt find one can you give me
> > >> a sample code for this??
> > >> thanks
> > >> sam
>
> > >> On 2/14/09, Jerome (Guru) <[email protected]> wrote:
>
> > >> > Hi Sam,
>
> > >> > Yes, this is absolutely something you can implement with the Google
> > >> > Gadget API, using the remote content fetch capabilities to read the
> > >> > feed.
>
> > >> > A good way to get started is to see how other developers have done
> > >> > something similar already. I would suggest you browser the iGoogle
> > >> > gadget directory, find some gadgets which looks like what you want to
> > >> > do, and then download and read the code in the xml spec.
>
> > >> > Hope this helps.
>
> > >> > Jerome
>
> > >> > On Feb 12, 6:09 am, sam <[email protected]> wrote:
> > >> >> hello,
> > >> >> I'm new to this and would like some help... I want to create a gadget
> > >> >> that
> > >> >> randomly selects and displays one photo within the gadget by using
> > >> >> feeds(rss) as source to images( for eg. feeds of msn movie
> > >> >> photos..etc)
>
> > >> >> Please let me know if it looks possible to do.
>
> > >> >> Thanks- Hide quoted text -
>
> > - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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