Get name of field being passed
<p>I have two sets of lists (state lists)
One called state_o and one called state_d and I have a function I do on them</p>

<pre><code>function selectCountry(sel) {
    document.getElementById("country_o").selectedIndex = states[sel.value];
}
</code></pre>

<p>Now what I want to do is determine if the "sel" is state_o or state_d and change the getElementById("country_o") to either _o or _d depending on what state is selected, so state_o would do country_o and state_d would do country_d</p>

<p>How can I determine the select field name?</p>

<p>Thanks!</p>
