How do you do the POST? I tried adding this function

function postwith(to,p) {
  var myForm = document.createElement("form");
  myForm.method="post" ;
 myForm.enctype = "application/atom+xml";
  myForm.action = to ;
  for (var k in p) {
    var myInput = document.createElement("input") ;
    myInput.setAttribute("name", k) ;
    myInput.setAttribute("value", p[k]);
    myForm.appendChild(myInput) ;
  }
  document.body.appendChild(myForm) ;
  myForm.submit() ;
  document.body.removeChild(myForm) ;
}

but that won't change the enctype.

I tried to call POST on the google.gdata.calendar.CalendarService
object but it isn't supported.

Also I tried:
var feed = feedRoot.feed;
var entries = feed.entry;
console.log('entries length', entries.length);
console.log(entries[0].getId().getValue());
console.log(entries[0].getContent().getText());
 //feed.insertEntry(ce, hie, herror);
feed.addEntry(ce);

And the entry was inserted into the feed but it doesn't stay in there.
The next time I look at the feed, the added comment is gone.
I know there is something tricky going on because none of google's
examples are examples of adding comments.
What is the secret?
Thanks,
Tim


On Jan 31, 10:20 pm, Ray Baxter <[email protected]> wrote:
> Yourcommentxml should look like the example 
> here:http://code.google.com/apis/gdata/elements.html#gdComments
>
> Ray
>
> On Wed, Jan 28, 2009 at 3:39 AM, talby101
>
> <[email protected]> wrote:
>
> > Hi there I am trying to post acommentto my event using the data api
> > but failing with a HTTP 500 error - Error addingcomment. I really
> > wish i could RTFM but the docs are pretty scant on this one (if not
> > please notify)...
>
> > (All i could find doc wise : 
> > ttp://code.google.com/support/bin/answer.py?answer=64265&topic=10365
> > )
>
> > Here is my post:
>
> > <atom:entry   xmlns:atom='http://www.w3.org/2005/Atom'
> >                        xmlns:gd='http://schemas.google.com/g/2005'
> >                        xmlns:gCal='http://schemas.google.com/gCal/
> > 2005'
> >                        xmlns:gAcl='http://schemas.google.com/acl/
> > 2007'
> >                        xmlns:batch='http://schemas.google.com/gdata/
> > batch'>
> > <atom:category scheme='http://schemas.google.com/g/2005#kind'
> > term='http://schemas.google.com/g/2005#message'/>
> > <atom:content type='text'>some text</atom:content>
> > <atom:author>
> > <atom:name>some name</atom:name>
> > <atom:email>some email</atom:email>
> > </atom:author>
> > </atom:entry>
>
> > Can anyone see anything wrong with that ? My content type is
> > application/atom+xml and method is POST.

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