I have the following HTML/Javascript code: http://jsfiddle.net/xxwa7/ and I am trying to submit the variable GPSlocation back to the server.
I am using Google App Engine with Python and Jinja2. I would like to submit it with a POST method but I am not sure how to do that with a javascript method. I would imagine this is somewhat simple but I can’t find it online anywhere.
Thanks!
In the end wash, there are only three ways to pass data from a web browser to a server.
varstatements in the new document.To post a form with Javascript is fairly easy. Create the form using your standard HTML markup. Use standard Javascript and DOM methods to update the form values.
Assuming only one form on your document:
Edit: From the comments:
For the HTML:
For the Javascript:
There are a number of other ways to access form fields and values. A google search for ‘javascript modify forms` brings up pages.