Hi,

I believe the reason might be because you didn't set the initial callback
after the google.load('gdata', 'a'), you need to do this -

google.setOnLoadCallback(init);

and create a function init that looks like -

function init() {
// Submit the request using the calendar service object
calendarService.getEventsFeed(feedUri, callback, handleError);
}

Hope that helps,
Austin

On Mon, Jun 9, 2008 at 6:42 AM, wemm22 <[EMAIL PROTECTED]>
wrote:

>
> Hi,
>
> I try the example from the Google-Page "Retrieve all events" but there
> is no output. Does anyone knows the reason?
>
> Thanks for your answers.
>
> Wolfgang
>
> =====================================================================
>
> <html>
>
> <head>
>
> <script type="text/javascript" src="http://www.google.com/jsapi?
> key=ABQIAAAA-
>
> VmdX7FlJgbCAk_h0jZMjBSQTWvq2bRCqOeKJzm_KiRjaIz5bhRI6TBrh86Qa_2BUj5GKrer6YNCyA<http://www.google.com/jsapi?key=ABQIAAAA-VmdX7FlJgbCAk_h0jZMjBSQTWvq2bRCqOeKJzm_KiRjaIz5bhRI6TBrh86Qa_2BUj5GKrer6YNCyA>
> ">
>
> google.load("gdata", "1");
>
> /*
>  * Retrieve all events
>  */
>
> // Create the calendar service object
> var calendarService = new
> google.gdata.calendar.CalendarService('GoogleInc-jsguide-1.0');
>
> // retrieve events
> var feedUri = 'http://www.google.com/calendar/feeds/
> [EMAIL PROTECTED]/public/full';
>
> // The callback method that will be called when getEventsFeed()
> returns feed data
> var callback = function(result) {
>
>  // Obtain the array of CalendarEventEntry
>  var entries = result.feed.entry;
>
>  // Print the total number of events
>  document.write('Total of ' + entries.length + ' event(s)');
>
>  for (var i = 0; i < entries.length; i++ ) {
>    var eventEntry = entries[i];
>    var eventTitle = eventEntry.getTitle().getText();
>    document.write('Event title = ' + eventTitle);
>  }
> }
>
> // Error handler to be invoked when getEventsFeed() produces an error
> var handleError = function(error) {
>  document.write(error);
> }
>
> // Submit the request using the calendar service object
> calendarService.getEventsFeed(feedUri, callback, handleError);
>
> </script>
>
>
> </head>
>
> <body>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Calendar Data API" 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-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to