Forms and javascript and php

She has: 88 posts

Joined: Sep 2001

I'm curious, when creating a form whose action calls a php script for processing the data, does the onSubmit() javascript validation happen before the php script is called?

TIA
Dami

Renegade's picture

He has: 3,022 posts

Joined: Oct 2002

Generally, yes it does. Since javascript is a client side language, it is all done before it even gets to the PHP program.

She has: 88 posts

Joined: Sep 2001

Thanks, Renegade. I thought that was the case, but I wanted to be sure. Smiling

He has: 53 posts

Joined: Jun 2010

Of - Course, There is no doubt, because as we submit the form with data we perform some Validation through Regular Expression or java script validation concept, on client side.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.