I wish to create events of a calendar from blogger post.

I have created a calendar with the public access with the address:
'http://www.google.com/calendar/feeds/
enb7arko8hrfuevj3td0pmu0r4%40group.calendar.google.com/private/full'

I have changed a code from "Create a single event" (
http://code.google.com/intl/ru/apis/calendar/docs/1.0/developers_guide_js.html
).

My code looks so:
--------------------------------------------------------------------------
createRide();

function createRide()
{
    var who = 'Alex';
    var quantity = 3;
    var cmnt = who + '\n' + quantity + ' p.\nAny\nComment';
    var calendarService = new google.gdata.calendar.CalendarService
('Wake-Wake');
    var feedUri = 'http://www.google.com/calendar/feeds/
enb7arko8hrfuevj3td0pmu0r4%40group.calendar.google.com/private/full';
    var entry = new google.gdata.calendar.CalendarEventEntry();
    var title = who + ". " + quantity;
    entry.setTitle(google.gdata.Text.create(title));
    entry.setContent(google.gdata.Text.create(cmnt));
    var when = new google.gdata.When();
    var startTime = google.gdata.DateTime.fromIso8601
('2009-06-06T11:00:00.000+04:00');
    var endTime = google.gdata.DateTime.fromIso8601
('2009-06-06T18:00:00.000+04:00');
    when.setStartTime(startTime);
    when.setEndTime(endTime);
    entry.addTime(when);
    calendarService.insertEntry(feedUri, entry, 0, 0,
google.gdata.calendar.CalendarEventEntry);
}
--------------------------------------------------------------------------

I copy this code in window 'Create a single event'  'sample code
demonstrates' ( 
http://code.google.com/intl/ru/apis/calendar/docs/1.0/developers_guide_js.html
)  and I start. All works correctly and event in a calendar is
created.


I have created test record in my blog (http://wake-st.blogspot.com/
2009/06/test-google-calendar-new-entry.html) and have placed there the
same code:

--------------------------------------------------------------------------
<a onclick=javascript:rideRequest() href="#" >Test</a>
<script type="text/javascript" src="http://www.google.com/jsapi";></
script><script type="text/javascript" language="javascript">google.load
("gdata", "1.s"); createRide(); function createRide() { var who =
'Alex'; var msg = 'Alex\n1 p.\nAny\nComment'; var quantity = 3; var
calendarService = new google.gdata.calendar.CalendarService('Wake-
Wake'); var feedUri = 'http://www.google.com/calendar/feeds/
enb7arko8hrfuevj3td0pmu0r4%40group.calendar.google.com/private/full';
var entry = new google.gdata.calendar.CalendarEventEntry(); var title
= who + ". " + quantity; entry.setTitle(google.gdata.Text.create
(title)); entry.setContent(google.gdata.Text.create(msg)); var when =
new google.gdata.When(); var startTime =
google.gdata.DateTime.fromIso8601('2009-06-06T11:00:00.000+04:00');
var endTime = google.gdata.DateTime.fromIso8601
('2009-06-06T18:00:00.000+04:00'); when.setStartTime(startTime);
when.setEndTime(endTime); entry.addTime(when);
calendarService.insertEntry(feedUri, entry, 0, 0,
google.gdata.calendar.CalendarEventEntry); }</script>
--------------------------------------------------------------------------


But in a blog it is not started.

Where I have committed an error? What it is necessary to make, that
the code was started?

Yours faithfully,
Alexey

--~--~---------~--~----~------------~-------~--~----~
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