Hi, I have the following HTMl:
<input id="brandID" name="brandID" type="hidden" value="" />
<select id="selectList" class="textfield70pc" name="selectList">
<option selected="" value="221">A</option>
<option value="4673">B</option>
</select>
Upon changing the value of a select box, I need to populate this input field. I've tried something like this, but it's not working.
jQuery('#selectList').change(function(){
jQuery('#brandID').attr('value', '123123');
});
Suggestions anyone?
Update
This works though:
document.getElementById('brandID').value = '123'
But I would like to use jQuery.