Tedah3143
12 Jan 2010, 05:20 PM
I am seeking to have a List Menu w/Country Names in that when a country is selected, the appropriate Textboxes appear allowing for the proper protocol per country, thereby causing a greater chance for accuracy. The code will be used for user entry of telephone numbers and postal code information by displaying the precise number of fields and limiting their digits.
If anyone out there will help, it would be appreciated by myself and probably by others as I have scoured the internet for a solution to no avail as of yet.
It probably needs some JavaScript. Please Help. Thanks.
Country:
<select name="Country" class="textfieldRequiredState" id="Country">
<option selected="selected">Select One</option>
<option value="U.S.A.">U.S.A.</option>
<option value="England">England</option>
</select>
</p>
<p>
<input name="USA Area Code" type="text" id="USA Area Code" maxlength="3" width="35" minlength="3" size="1" />
-
<input name="USA Prefix" type="text" id="USA Prefix" minlength="3" maxlength="3" width="35" size="1" />
-
<input name="USA Line Number" type="text" id="USA Line Number" minlength="4" maxlength="4" width="35" size="1" />
(U.S.A.: 3-3-4 Digits)
</p>
<p>
<input name="England Area Code" type="text" id="England Area Code" maxlength="4" width="35" size="1" />
-
<input name="England 1" type="text" id="England 1" maxlength="3" width="35" size="1" />
-
<input name="England 2" type="text" id="England 2" maxlength="3" width="35" size="1" />
(England: Up to 4 then 3-3 Digits)
</p>
<p>If option value is "U.S.A." then display Textfield "USA Area Code", Textfield "USA Prefix", Textfield "USA Line Number" at "x" "y" coordinates.
If anyone out there will help, it would be appreciated by myself and probably by others as I have scoured the internet for a solution to no avail as of yet.
It probably needs some JavaScript. Please Help. Thanks.
Country:
<select name="Country" class="textfieldRequiredState" id="Country">
<option selected="selected">Select One</option>
<option value="U.S.A.">U.S.A.</option>
<option value="England">England</option>
</select>
</p>
<p>
<input name="USA Area Code" type="text" id="USA Area Code" maxlength="3" width="35" minlength="3" size="1" />
-
<input name="USA Prefix" type="text" id="USA Prefix" minlength="3" maxlength="3" width="35" size="1" />
-
<input name="USA Line Number" type="text" id="USA Line Number" minlength="4" maxlength="4" width="35" size="1" />
(U.S.A.: 3-3-4 Digits)
</p>
<p>
<input name="England Area Code" type="text" id="England Area Code" maxlength="4" width="35" size="1" />
-
<input name="England 1" type="text" id="England 1" maxlength="3" width="35" size="1" />
-
<input name="England 2" type="text" id="England 2" maxlength="3" width="35" size="1" />
(England: Up to 4 then 3-3 Digits)
</p>
<p>If option value is "U.S.A." then display Textfield "USA Area Code", Textfield "USA Prefix", Textfield "USA Line Number" at "x" "y" coordinates.