Hi I am implementing a email page.The requirement is: when the user clicks on send button widout filling a field then the the lable before the text box should turn red and a asterix should appear. How should i go about it .Please help
rocknbil
7:10 pm on Mar 5, 2010 (gmt 0)
Welcome aboard neha11, specifically, this is done with Javascript. There's no single drop-code solution, you'll have to research form validation Javascipt.
But Javascript can be disabled, so you need to duplicate what you're doing on the server side as well. Most of the time, this is done with a validation that just returns a stark page with "error in your form, go back" and is horrible. What should happen is the form is re-output on error with the errant fields highlighted, like you say. So you need to do BOTH.