Pls help:)
can someone help me to get an output this way using javascript.
@ganeshie8
It looks like you've got a php form there, you don't really need javascript, just have the form post to wherever. What is it exactly you're tryign to do?
Oh, the red validation indicators, you wouldn't want to do that in javascript. just use html 5 and make the fields required. Validation of any kind should not be done client side
If you are trying to do the same sort of thing, but with JS, try these: http://www.tutorialspoint.com/javascript/javascript_form_validations.htm http://www.w3schools.com/js/js_form_validation.asp The down side is that JS is a client side thing, so they can choose not to run the script.
For PHP and input validation, check that the post variables are not null and that the variable contains a string
Join our real-time social learning platform and learn together with your friends!