JavaScript question, your help needed Please!!!

wxdqz

New Member
Hi everyone, I know this will sound like a silly question to you, but I'm new to this and I've tried hard, but everything I'm trying from other scripts etc won't work. Basically from the code I will paste below, I want to make it so that only normal characters can be accepted in the fields (A-Z,a-z and 0-9, nothing else). Can you please tell me what I need to add to the following code? Here is my HEAD stuff (body is below): <script language="javascript"><!--function simpleCheck(form) {if (form.contactNAME.value == "") {alert("Please supply your name.");form.contactNAME.select(); }else if (form.contactEMAIL.value =="") {alert("Please include your e-mail address.");form.contactEMAIL.select(); }else {form.method="POST";form.target="_self"form.submit();}}//--></script>and lastly, body: (as well as my normal info for the submit) <form onSubmit="simpleCheck(this); return false;"(and then my other info for submission).All this works fine, but can you please tell me how to make it accept only those/ Many thanks in advance for your help!
 
Back
Top