jquery select on form has to be reselected to work after each page load
<p>I am using the following jquery in order to disable text boxes on my page.  The issue I am running into is that by default because its stored in the database it loads the page with "remote_server" set to 0. Even with this being set automatically the fields are still able to be modified.  I must click on the selection drop down and reselect "no" for it to work.  </p>

<p>Here is my JS</p>

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

if ( strUser == 0 ) {

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

<p>My remote_server HTML code for the drop down selection.</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>Loading the page I an see where the option 0 is selected aswell which is why this puzzles me</p>

<pre><code>&lt;select name="remote_server" class="required"&gt;
&lt;option&gt;&lt;/option&gt;
&lt;option value="1" &gt;Yes&lt;/option&gt;
&lt;option value="0" selected="selected"&gt;No&lt;/option&gt;
&lt;/select&gt;
</code></pre>
