JavaScript and ASP.. How do I create an if statement that looks at the value of an asp drop down control?
<p>The following javascript works with a simple test site i made, but does not work when i put it into my production site.
in..:</p>

<pre><code>&lt;script type="text/javascript"&gt;
    strLen = function(input){
var errorLabel = document.getElementById("errorLabel");
var drpDown = document.getElementById("Select1");
if (drpDown.value == "USA")
if (errorLabel)
    errorLabel.style.display = input.value.length &gt; 2 ? "block" : "none" ;
if (drpDown.value != "USA")
    errorLabel.style.display = "none";
}
&lt;/script&gt;


&lt;asp:textbox id="txtShipState" CssClass="style5" TabIndex="2" runat="server"
    Width="40px" MaxLength="10" onkeyup="strLen(this)"&gt;&lt;/asp:textbox&gt;&amp;nbsp;

&lt;asp:dropdownlist id="drpShipCountry" runat="server" style="display:none"
    AutoPostBack="true" TabIndex="2"&gt;&lt;/asp:dropdownlist&gt;

&lt;select name="drpShipCountry"onchange="javascript:setTimeout('__doPostBack(\'drpShipCountry\',\'\')', 0)" id="Select1" tabindex="2"&gt;
&lt;option selected="selected" value="USA"&gt;United States&lt;/option&gt;
&lt;option value="ALB"&gt;Albania&lt;/option&gt;
&lt;option value="DZA"&gt;Algeria&lt;/option&gt;
&lt;option value="ATA"&gt;Antarctica&lt;/option&gt;
&lt;option value="ATG"&gt;Antigua and Barbuda&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p>i dont know where or how its being added.. i shortened the list because its very long</p>
