Form validation

zaboss

Perch
Hi,

I need a javascript snipet to check if the value entered in a field of a form match a value from a list. To be more specific, I need to check if the username is already taken before the user submit the form.

Thanks,
 
You'd need to employ both javascript and server-side code, as the username will need to be a database query . Given that, you might as well stick with server-side only, as javascript is so easy to circumvent. What server-side scripting language are you planning to employ?
 
You'd have to use Ajax to accomplish a call without hitting submit. While I don't have any ready-made code for you, there's a decent Ajax tutorial that you might find useful here.
 
The problem is that i'm completely clueless on javascript. I can aproximate the asp code needed, but can't do the javascript magic.
 
Back
Top