JavaScript Help, Javascript with a form |
![]() ![]() |
JavaScript Help, Javascript with a form |
May 16 2008, 10:26 AM
Post
#1
|
|
|
New Member ![]() Posts: 3 OS: Windows 2007 XP |
I am creating a form for my website that simply asks for a Name, username and phone number. I am really good at writting html and have that part of it done. I have a basic understanding of javascript and want to have the javascript validate the form before it is submitted. I want only letters in the name field. For the password I only want 8 characters total that starts with a letter, includes at least 2 numbers, and has no spaces. For the phone number I only want numbers. Can anyone help me by putting me on the right track? Thanks! |
|
|
May 19 2008, 11:28 AM
Post
#2
|
|
![]() TA Moderator Posts: 1,275 From: SET HOMEPATH OS: Windows 95/98/2000/XP/Vista |
Hello,
What you want to do can be accomplished by writing javascript functions using regular expressions. Following are some references that may help you out: JavaScript RegExp Object - Using Regular Expressions with Client Side Scripting Core JavaScript 1.5 Guide:Regular Expressions - MDC Regards, Ax |
|
|
![]() ![]() |
Similar Topics
| Topic Title | Replies / Views | Topic Information | |||||
|---|---|---|---|---|---|---|---|
![]() |
1 / 871 | 17th June 2004 - 09:25 PM Emory started - last by ditto |
|||||
![]() |
2 / 934 | 18th April 2005 - 02:29 AM Jordan started - last by ssjmichael |
|||||
![]() |
3 / 292 | 1st May 2005 - 09:39 AM momofmany started - last by jake6535 |
|||||
![]() |
2 / 481 | 19th May 2006 - 03:44 PM yaddie started - last by Mike-pxndx |
|||||
![]() |
3 / 242 | 13th July 2008 - 11:12 PM Jacksown started - last by Jacksown |
|||||
|
Time is now: 10th October 2008 - 03:16 PM |
| Advertisements do not imply our endorsement of that product or service. The forum is run by volunteers who donate their time and expertise. We make every attempt to ensure that the help and advice posted is accurate and will not cause harm to your computer. However, we do not guarantee that they are accurate and they are to be used at your own risk. |