The following javascript works with a simple test site i made, but does not work when i put it into my production site.
in..:
<script type="text/javascript">
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 > 2 ? "block" : "none" ;
if (drpDown.value != "USA")
errorLabel.style.display = "none";
}
</script>
<asp:textbox id="txtShipState" CssClass="style5" TabIndex="2" runat="server"
Width="40px" MaxLength="10" onkeyup="strLen(this)"></asp:textbox>
<asp:dropdownlist id="drpShipCountry" runat="server" style="display:none"
AutoPostBack="true" TabIndex="2"></asp:dropdownlist>
<select name="drpShipCountry"onchange="javascript:setTimeout('__doPostBack(\'drpShipCountry\',\'\')', 0)" id="Select1" tabindex="2">
<option selected="selected" value="USA">United States</option>
<option value="ALB">Albania</option>
<option value="DZA">Algeria</option>
<option value="ATA">Antarctica</option>
<option value="ATG">Antigua and Barbuda</option>
</select>
i dont know where or how its being added.. i shortened the list because its very long
Give this a shot:
EDIT
After looking at your revised question, please try the following instead: