|
-
Sep 5th, 2003, 08:20 PM
#1
Thread Starter
Hyperactive Member
Checking textbox for illegal characters w/ Javascript
I am working on a form, with several text boxes on it. I would like to know how I can go about trying to check for certain characters. Currently I am just checking if the text boxes have something in them. with the following code.
(isEmpty(document.guestform.visitorname.value.toString()))
{ alert("You need to provide a name.");
document.guestform.vistorname.focus(); return false; }
How can I incorportate into this or after this piece of code something that will check if a "\" or a "/" is found. I need to check for this because \ / is not part of a valid name.
I am using javascript.
Thanks to all that help out.
I really appreciate your help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|