Add this at the top of the page:
<SCRIPT LANGUAGE="JavaScript1.1" SRC="formChek.js"></SCRIPT>
Put the attached file in the same directory as your page
Put this code in the phone number tag
<TD><cfinput TYPE="text" NAME="earea" value="#earea#" SIZE=5 onChange="checkArea(this)"></TD>
<TD><cfinput TYPE="text" NAME="evph" value="#evph#" SIZE=8 onChange="checkUSPhone(this)"></TD>
This works great for me. You will have to tweak the formchek.js to include both the area code and the phone number. I separated mine 'cause our area codes keep changing.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 04, 2001 11:58 AM
To: [EMAIL PROTECTED]
Subject: How to format a number into telephone#
I have a 10 digit# (1234567890) stored in a database. How to format it with
cf tags or JS functions to get (123)456-7890? I know how toconvert it in
sql.
Thanks,
Henry
-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com
-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org
FormChek.js