How can I pass a variable value from a template using JavaScript without using a form (GET OR POST)?
views:
302answers:
1
+1
A:
You can send this value from JavaScript via Xml Http Request without using form - see how AJAX works.
See for example POST request with jQiery JS library - http://docs.jquery.com/Ajax/jQuery.post
The uri
parameter is URI of your Django view, data
- JS object that you send to server and finally callback
- JS function to process server response.
Alex Pavlov
2009-07-02 08:01:16