开发者

Can I submit form info to Google Spreadsheets with jQuery's AJAX?

I like being able to use google spreadsheets, but it's tricky to integrate into my site visually. So I was thinking that I would recreate their form (an easy cut/paste), submit the form via AJAX, the data would go to the spreadsheet and I could redirect my user to something more pretty than google's default 'thank you for doing whatever you just did' page.

But i'm having a lot of trouble submitting the form. I've got my js to the point where the url that the submission goes to (and the get parameters) match exactly what the google form submits (firebug's net tab was very handy here). In fact when I copy the failed submission url from 开发者_如何转开发firebug and put that in the browser it goes through no problem.

You're welcome to check it out. http://www.stardustindependent.com/cookies What's the problem here? The relevant JS is in custom.js.


Ok, I still don't know what's up with that. I saw some inconclusive reference to google wanting to prevent cross-domain issues, but it wasn't helpful info.

My solution ended up coming from http://googlesystem.blogspot.com/2008/05/customize-google-docs-forms.html. It's not ajax, but it gives you control of the form layout/css and it doesn't redirect you to that nasty looking google page.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜