I am running the code below and getting the following error.
getMyFeed is not defined
Help please?
<html>
<head>
<script type="text/javascript">
google.load('gdata', '1.s');
google.setOnLoadCallback(getMyFeed);
</script>
<script type="text/javascript">
var feedUrl = "http://www.google.com/calendar/feeds/default/
private/full";
function logMeIn() {
scope = "http://www.google.com/calendar/feeds/";
var token = "google.accounts.user.login(scope)";
}
function setupMyService() {
var myService = new google.gdata.calendar.CalendarService
('exampleCo-exampleApp-1');
logMeIn();
return myService;
}
function getMyFeed() {
myService = setupMyService();
myService.getEventsFeed(feedUrl, handleMyFeed,
handleError);
}
function handleMyFeed(myResultsFeedRoot) {
alert("This feed's title is: " +
myResultsFeedRoot.feed.getTitle().getText());
insertIntoMyFeed(myResultsFeedRoot);
}
function handleError(e) {
alert("There was an error!");
alert(e.cause ? e.cause.statusText : e.message);
}
function insertIntoMyFeed(feedRoot) {
var newEntry = new google.gdata.calendar.CalendarEventEntry
({
authors: [
{
name: "Rick",
email: "[email protected]"
}
],
title: {type: 'text', text: 'Do Something'},
content: {type: 'text', text: 'We will do something.'},
locations: [
{
rel: "g.event",
label: "Event location",
valueString: "My Place"
}
],
times: [
{
startTime:
google.gdata.DateTime.fromIso8601("2009-11-23T18:00:00.000Z"),
endTime:
google.gdata.DateTime.fromIso8601("2009-11-23T19:00:00.000Z")
}
]
}
);
feedRoot.feed.insertEntry(newEntry, handleMyInsertedEntry,
handleError);
}
function handleMyInsertedEntry(insertedEntryRoot) {
alert("Entry inserted. The title is: " +
insertedEntryRoot.entry.getTitle().getText());
alert("The timestamp is: " +
insertedEntryRoot.entry.getTimes()[0].startTime);
}
</script>
</head>
<body>
<IMG src="images/pixel.gif">
</body>
</html>
--
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.