Handling "other" option in dropdown select with free text input field
<p>I'm trying to figure out the best way to handle a dropdown list where one of the options "other" shows a hidden text field (via jQuery), where the user can then enter text. Should both the dropdown and the input field be given the same "name" attribute, then server side code runs a check on the values of each in order to know what one is the active value - e.g if the value of the select box is "other", then check the value of the text input field - if this isn't the default value ("enter text"), then it's ok to use this value and save it to the database. Is this a messy approach to this problem? </p>

<p>EDIT: this is my client side code for show/hiding the "other" field.</p>

<pre><code>$('.select_change').live("click change", function(){
            //check if value is other
            $(this).parent().find(".hidden").toggle($(this).val() == 'other');
        });
</code></pre>
