jquery not enabling/disabling drop down option based on other drop down option
<p>I am using the following jquery code in order to have the following happen</p>

<pre><code>if remote_server is "yes" 
     allow all fields under FTP
else remote_server is "no"
     disable all fields under FTP
</code></pre>

<p>The issue I am running into is that changing "remote_server" to no does not disable the "ftp_mode" drop down option but does disable all the text boxes.  If I am setting "remote_server" to yes then all the boxes are enabled with the exception of the "ftp_mode" drop down option</p>

<p>JQ code</p>

<pre><code>var e = document.getElementsByName("remote_server")[0]
var strUser = e.options[e.selectedIndex].value;

$('select[name=remote_server]').change(function(){
   var inputs = $('input[name^=ftp_],select[name^=ftp_]');
   $(this).val() == "0" ? inputs.attr("disabled", "disabled") : inputs.removeAttr("disabled");
}).change()
</code></pre>

<p>Here is the HTML to both options:</p>

<p>Remote_server:</p>

<pre><code>&lt;select name="remote_server" class="required"&gt;
&lt;option&gt;&lt;/option&gt;
&lt;option value="1" &lt;?php if($remote=="1") echo 'selected="selected"'; ?&gt;&gt;Yes&lt;/option&gt;
&lt;option value="0" &lt;?php if($remote=="0") echo 'selected="selected"'; ?&gt;&gt;No&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p>ftp_mode</p>

<pre><code>&lt;select name="ftp_mode" class="required"&gt;
&lt;option&gt;&lt;/option&gt;
&lt;option value="1" &lt;?php if($ftpmode=="1") echo 'selected="selected"'; ?&gt;&gt;Active&lt;/option&gt;
&lt;option value="0" &lt;?php if($ftpmode=="0") echo 'selected="selected"'; ?&gt;&gt;Passive&lt;/option&gt;
&lt;/select&gt;
</code></pre>
