Is there a way to pass a js popup value directly to a python/django view, or is necessary to capture this value with a javascript function and then do an ajax call?
For example:
<form>
<input type="text" name="name"/>
<input type="submit" id="submit"/>
</form>
<script type="text/javascript">
function myFunction() {
$('#submit').click(function() {
var name=prompt("Please enter your name","");
});
}
</script>
If it can be done directly, how would this be done?
You would have to do something along the lines of:
to get the value the user filled out in the prompt back to your django app.