Forum Moderators: open
i am having great difficutly changing the value of a select menu by clicking on a radio button. so far i have the following:
function changetext(type)
{
document.form1.description.options[document.form1.description.selectedIndex].value = type;
}
</script>
<form name="form1">
<input type="radio" name"radio" value="A" onClick="changetext('A')">A
<input type="radio" name"radio" value="B" onClick="changetext('B')">B
<select name="description" id="description">
<option value="A">Type A</option>
<option value="B">Type B</option>
</select>
</form>
i would like A or B to be selected when i click on the appropriate radio button.
this can't be hard, but i have tried so many different ways of selectedIndex, value, text, index, whatever- totally confused ;)
much appreciate any help