A
ahixon2112
I have a form that contains two radio buttons each with a drop down
list attached. As the form loads, I have the following javascript that
runs after the drop down lists populate with items from a database:
<script language="javascript">
this.form.ManagementCheck[0].checked=false;
this.form.ManagementCheck[1].checked=false;
if (this.form['Manager'].selectedIndex != 0)
{this.form.ManagementCheck[0].checked=true};
if (this.form['Director'].selectedIndex != 0)
{this.form.ManagementCheck[1].checked=true};
</script>
I also have some code up above this (ColdFusion) that sets one of the
list items to selected if that particular field is populated in the
database and matches an item from the list. So, I would like for the
radio button that's beside it's respective drop down list to become
checked if the selectedIndex of that list is not 0, but I can't get it
to be consistent. Once a radio button is selected, it will not change
no matter which list has an item selected.
Any thoughts?
list attached. As the form loads, I have the following javascript that
runs after the drop down lists populate with items from a database:
<script language="javascript">
this.form.ManagementCheck[0].checked=false;
this.form.ManagementCheck[1].checked=false;
if (this.form['Manager'].selectedIndex != 0)
{this.form.ManagementCheck[0].checked=true};
if (this.form['Director'].selectedIndex != 0)
{this.form.ManagementCheck[1].checked=true};
</script>
I also have some code up above this (ColdFusion) that sets one of the
list items to selected if that particular field is populated in the
database and matches an item from the list. So, I would like for the
radio button that's beside it's respective drop down list to become
checked if the selectedIndex of that list is not 0, but I can't get it
to be consistent. Once a radio button is selected, it will not change
no matter which list has an item selected.
Any thoughts?