I am writing a small app and I need to enter information using dropdown menus to then download the values as a csv file to be manipulated in Python. It's all offline; the only reason why I am using Javascript is because I need to show interactive svg charts and its easier in a browser. My form is something like this:
<form name="myForm">
<select name="dropdownMenu">
<option value="a">a</option>
<option value="b">b</option>
<option value="c">c</option>
</select><br>
</form>
And then I know I can access the selected form value with something like:
<input type="button" value="Click" onclick="alert(document.myForm.dropdownMenu.value)">
Is there any way to trigger a download
of that value with something like this?:
<a href="document.myForm.dropdownMenu.value" download="myFile.csv">Download</a>