How to trigger javascript event using select box
<script>
function fireonId(thisVal) {
var value = incontrol.options[incontrol.selectedIndex].value;
if (value == 'confirm') {
document.getElementById('fireonId').style.visibility = 'visible';
} else {
document.getElementById('fireonId').style.visibility = 'hidden';
}
}
</script>
<select class="select3" name="fireonIdType" onchange="fireonId(this)">
<option selected="selected" value="select">- Select fireon.in Type -</option>
<option value="suspect">Suspected</option>
<option value="confirm">Confirmed</option>
</select>
<select class="select4" id="test" name="fireonId" style="visibility: hidden;">
<option selected="selected">- Select fireon.in -</option>
</select>
No comments: