91
rated 0 times
[
97]
[
6]
/ answers: 1 / hits: 58465
/ 12 Years ago, tue, june 26, 2012, 12:00:00
Alright I don't see why this isnt working. It seems pretty simple.
Here is my drop-down menu:
<div>
<form>
<select id='yearDropdown'>
<c:forEach var=years items=${parkYears}>
<option value=/events.html?display_year=${years}<c:if test=${currentYear == years}>selected=selected</c:if>>${years}</option>
</c:forEach>
</select>
</form>
</div>
and here is the JavaScript
$(#yearDropdown).change(function () {
alert('The option with value ' + $(this).val());
});
Right now I just want to get it working so I can add functionality. Thanks!
More From » jquery