If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

I don't know if there is any way via JavaScript to validate before submitting to the server, but you can definitely check it on the server side -- and you need to anyway in case somebody sidesteps your client-side validation.

I have a vague recollection of trying to do some validation via JavaScript, but even though I was only trying to validate the filename extension in the <form> (which is unreliable in itself) I ran into security issues. You *might* be able to find a Java applet that would do the job on the client side, but the easiest method is as NogDog suggests - do it on the server.