> if (document.particulars.username.value == "") { 
>        alert('Please Enter a Username'); 
>        return false; 
>    } 

A simple solution.

if (input.value == "") { 
        alert("Please enter a user name"); 
        return false;
} 
if (input.value.indexOf(";")!=-1) { 
        alert("The user name can not contain a ';' character"); 
        return false;
} 
if (input.value.indexOf(" ")!=-1) { 
        alert("The user name can not contain a space"); 
        return false;
} 

You can use the search() function of the String object with a reg exp but
not all browsers support it.

hth 
Rod

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to