Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

JavaScript Help


  • Please log in to reply

#1
FlipLipshizts

FlipLipshizts

    New Member

  • Member
  • Pip
  • 3 posts
Hi!

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!
  • 0

Advertisements


#2
Ax238

Ax238

    Tech Staff

  • Technician
  • 1,323 posts
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
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP