in reply to CGI form validation on submit

I think you need to be a little clearer on the whole client-server communication thing. Basically, the deal is something like this.

Hopefully you can see from this model that your CGI script runs *on the server*, not the client. The client simply receives the output, renders it, optionally uses client-side-scipting to process it (document.write, onSubmit etc.) and sends it back.

As an aside, you should never *rely* on client-side scripting to validate a form. Having it as an extra check before submission is fine, but the server script should do this also to cater for those who don't run JS / hand craft forms / hack your HTML. Many many JS shopping cart systems have learnt this to their cost :)

Hope this helps, Ben.