Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 655
doub1ejack Avatar asked Dec 04 '10 00:12

doub1ejack


1 Answers

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.

like image 170
doub1ejack Avatar answered Sep 21 '22 02:09

doub1ejack