Gemini532
asked on
If the country is US select a state
Hello Everyone, Is there a way to get it so that either the state is disabled until the country selected is United States,
OR
have the state row appear ONLY if the country selected is United States?
Can you help me write either of these type of code?
I'm not sure how to make a state disabled, or would it be easier to get the whole state row to dissappear unless the country selected is United Satets
<TR>
<TD class="number"> </TD>
<TD class="question">State:<fo nt color="#FF0000">*</font></ TD>
<TD class="response"> <select name="AuthorizedRepState" id="AuthorizedRepState" style="font-family: Verdana; font-size: 8pt">
<% showStates sAuthorizedRepState %>
</select></TD>
</TR>
<TR>
<TD class="number"> </TD> <TD class="question">Country:< font color="#FF0000">*</font></ TD> <TD class="response">
<select name="AuthorizedRepCountry " id="AuthorizedRepCountry" style="font-family: Verdana; font-size: 8pt">
<% showCountries sAuthorizedRepCountry %>
</select>
</TD>
</TR>
OR
have the state row appear ONLY if the country selected is United States?
Can you help me write either of these type of code?
I'm not sure how to make a state disabled, or would it be easier to get the whole state row to dissappear unless the country selected is United Satets
<TR>
<TD class="number"> </TD>
<TD class="question">State:<fo
<TD class="response"> <select name="AuthorizedRepState" id="AuthorizedRepState" style="font-family: Verdana; font-size: 8pt">
<% showStates sAuthorizedRepState %>
</select></TD>
</TR>
<TR>
<TD class="number"> </TD>
<select name="AuthorizedRepCountry
<% showCountries sAuthorizedRepCountry %>
</select>
</TD>
</TR>
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The state row in your code, like that in other sites, has the Country field after the state one. It usually is not worthwhile to disable a previous field. However if you want use ...
<select name="AuthorizedRepCountry
Let me know if you have any questions or need more information.
b0lsc0tt