Events don't have colors. Only calendars have colors. http://code.google.com/apis/calendar/reference.html#gcal_reference
To add a comment to an event, you must first create it, then post the comment to the event's comment link. I don't immediately see an example in the Javascript API documentation, but you can see http://code.google.com/apis/calendar/faq.html#add_comments and http://code.google.com/apis/gdata/elements.html#gdComments for details. Ray -- Ray Baxter [EMAIL PROTECTED] On Aug 27, 2008, at 10:42 AM, [EMAIL PROTECTED] wrote: > > HELLO, I AM A NEWBIE. I TRY TO CREATE AN EVENT, USING JAVASCRIPT. > > I DON'T KNOW HOW TO HAVE > A SPECIAL COLOR FOR AN EVENT > A COMMENT FOR THIS EVENT; > > HERE IS MY CODE : > > // Create an instance of CalendarEventEntry representing the new > event > var entry = new google.gdata.calendar.CalendarEventEntry(); > > // Set the title of the event > entry.setTitle(google.gdata.Text.create(title[i])); > > > // Set the calendar location > > var where = new google.gdata.Where(); > where.setValueString(location[0] + ", France"); > entry.addLocation(where); > > // Set the color that represent this calendar in the Google Calendar > UI > > // HERE I WOULD LIKE TO HAVE A SPECIAL COLOR FOR THIS EVENT > // THE THREE NEXT LINES DOES NOT WORK > var color = new google.gdata.calendar.ColorProperty(); > color.setValue('#2952A3'); > entry.setColor(color); > > // HERE I WOULD LIKE TO SET A COMMENT FOR THIS EVENT > // THE THREE NEXT LINES DOES NOT WORK > > // Set the calendar summary > var summary = new google.gdata.Text(); > summary.setText(description[0]); > entry.setComments(summary); > > // Create a When object that will be attached to the event > var when = new google.gdata.When(); > > // Set the start and end time of the When object > var startTime = google.gdata.DateTime.fromIso8601(startdate[i]); > //var startTime = > google.gdata.DateTime.fromIso8601("2008-08-27T09:00:00.000-08:00"); > var endTime = google.gdata.DateTime.fromIso8601(enddate[i]); > when.setStartTime(startTime); > when.setEndTime(endTime); > > // Add the When object to the event > entry.addTime(when); > > THANK YOU SO MUCH FOR YOUR HELP. > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
