views:

302

answers:

1

How can I pass a variable value from a template using JavaScript without using a form (GET OR POST)?

+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