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.