validation error messages on html page

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
paul_20k
Forum Commoner
Posts: 45
Joined: Fri Nov 10, 2006 7:02 pm

validation error messages on html page

Post 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
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

You need to use Javascript if you want to validate before sending it to the server.
paul_20k
Forum Commoner
Posts: 45
Joined: Fri Nov 10, 2006 7:02 pm

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

The only way to do validation without submission is with client level scripting.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post 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.
User avatar
Popcorn
Forum Commoner
Posts: 55
Joined: Fri Feb 21, 2003 5:19 am

Post 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.
Post Reply