Form validation and alerts

hello all,

i have this simple form and what i would like to do is when a field is unable to be validated i would like the form to display above the text field in red “please fill it out etc.”
like the link below.

can anyone point me in the right direction with this please?

I presume that you are aware of JavaScript and can integrate jQuery’s validation plugin. See this page for more details and how to.

thanks for your reply im not familiar no , but i will read the posted link.

I dont think its jscript though , i have scripts turned off and it still does this.

The simplest way probably is to submit the form to the same page it is in. Then at the top of the page validate the form data server side, if the submit button was clicked, and get the server side code to display any error messages in the html before it is even sent back to the browser.

You don’t need javascript/jquery at all for validation and they should only be used as an optional extra for ux enhancement.