Select List Locks Other Select List

[Total: 0    Average: 0/5]

This shows how to have 2 select lists and have the first select that is choosen cause the other select list to become disabled.

Body Code:

<form name=exf1>
<select name=s1 onfocus="ok(1)">
    <option value=1>1
    <option value=2>2
</select><BR>
<select name=s2 onfocus="ok(2)">
    <option value=3>3
    <option value=4>4
</select><BR>
</form>
<script>
function ok(_v) {
  if (_v == 1) document.exf1.s2.disabled=true;
  if (_v == 2) document.exf1.s1.disabled=true;
}
</script>

Times Viewed: 0

Leave a Reply

Your email address will not be published. Required fields are marked *