Page 1 of 1

validation error messages on html page

Posted: Sat Nov 11, 2006 8:28 am
by paul_20k
Hi

I have a HTML form with action to php page. Is there any way that I can get error messages on the HTML form page, not on php page? As I have action to php page, as soon as I click Submit button, it goes to php page. I tried to use php on the same HTML page, but no success yet. I want to get all validations and errors done on html page and then it will go to php page. I have action to the php page.

Thanks

Posted: Sat Nov 11, 2006 8:42 am
by RobertGonzalez
You need to use Javascript if you want to validate before sending it to the server.

Posted: Sat Nov 11, 2006 9:19 am
by paul_20k
Thanks

so there is no way to do it what I am looking for?? I saw lots of sites which has this functionality.

Posted: Sat Nov 11, 2006 9:26 am
by feyd
The only way to do validation without submission is with client level scripting.

Posted: Sat Nov 11, 2006 11:19 am
by RobertGonzalez
paul_20k wrote:Thanks

so there is no way to do it what I am looking for?? I saw lots of sites which has this functionality.
That is not what we said. We said you need to use client side technology (Javascript) to do what you want. It can be done, quite easily, but not with PHP. It has to be done in the browser.

PS This is being moved to Client Side.

Posted: Sun Nov 19, 2006 4:45 am
by Popcorn
.. and even if you do it nicely client-side you still need to do it on the server side before acting on anything. I find myself doing it server-side then when I have time, implementing the client-side translation.