This is a part of my HTML form:
<form name = 'myform'>
<input type='button' name='mybutton' value='Activate'>
<input type='hidden' name='myhidden' value='elementvalue'>
I want to send the value of the hidden element to the server when the user clicks the 'Activate' button by using Ajax. Here is a snippet that works, but I need to change this part:
$("input[name=choice1]").val(this.value);
in order to select my hidden element value and I don't know how.
At this moment I'm learning Python, Flask/Jinja2 and HTML/CSS at the same time, so diving into jQuery as well is just too much right now.
Thank you for your efforts.