geuis
08-17-2003, 02:14 PM
I have a page I'm writing where the user inputs a phone number into one field. There are 2 hidden inputs that eventually have to hold the area code and the phone prefix.
How can I split the string input into two variables so I can set them into the hidden input's values?
The code, as it is now, follows:
<html>
<body>
<FORM ENCTYPE="multipart/form-data" ACTION="http://www.dslreports.com/coinfo/information/kb" METHOD="POST">
<b>Find </b> - :
<input size=6 maxlength=6 value="">
<input type="hidden" name=npa size=3 maxlength=3 value="">-
<input type="hidden" name=nxx size=3 maxlength=3 value="">-XXXX
<INPUT TYPE="submit" VALUE="Start" name="start">
</form>
</body>
</html>
How can I split the string input into two variables so I can set them into the hidden input's values?
The code, as it is now, follows:
<html>
<body>
<FORM ENCTYPE="multipart/form-data" ACTION="http://www.dslreports.com/coinfo/information/kb" METHOD="POST">
<b>Find </b> - :
<input size=6 maxlength=6 value="">
<input type="hidden" name=npa size=3 maxlength=3 value="">-
<input type="hidden" name=nxx size=3 maxlength=3 value="">-XXXX
<INPUT TYPE="submit" VALUE="Start" name="start">
</form>
</body>
</html>