The first part is to get the element from the drop down menu which may look like this:
<select id="cycles_list">
<option value="10">10</option>
<option value="100">100</option>
<option value="1000">1000</option>
<option value="10000">10000</option>
</select>
To capture via jQuery you can do something like so:
$('#cycles_list').change(function() {
var mylist = document.getElementById("cycles_list");
iterations = mylist.options[mylist.selectedIndex].text;
});
Once you have stored the value in your variable, the next step would be to send the information stored in the variable to the form field or HTML element of your choosing. It may be a div p or custom element.
i.e. <p></p> OR <div></div>
You would use:
$('p').html(iterations); OR $('div').html(iterations);
If you wish to populate a text field such as:
<input type="text" name="textform" id="textform"></input>
You would use:
$('#textform').text = iterations;
Of course you can do all of the above in less steps, I just believe it helps people to learn when you break it all down into easy to understand steps... Hope this helps!
txtEntry2
is a text input, OP will need to useval()
instead.