display input text error message as when using the required attribute : <p>I would like to know if you can create a javascript function that allows you to activate and then display an error message around the input text as when you do submit leaving the input blank and you have the required attribute.</p>

<p>a message is displayed when a certain condition occurs. is this possible?</p>
