jquery validation problem
<p>I have a question related to jquery. Basically I want to do a very simple thing. I have a text input field. On submit, I want to display error message if the field is empty.
I have done this way:</p>

<pre><code>errMsg = "Please write name";               
$("div#errMsg").css("background-color", "red");
 $("div#errMsg").html(errMsg);
</code></pre>

<p>and in the HTML: </p>

<pre><code>&lt;div id="errMsg"&gt;&lt;/div&gt;
&lt;strong&gt;Name:  &lt;/strong&gt;
&lt;input name="name" id="name" type="text" maxlength="255" size="50" /&gt;
</code></pre>

<p>It works fine, however there is a problem. When I leave the field empty and it displays the error message, the error message does not go away without refreshing the page.
I am trying to do it so that when there is error message, and i type something in the field, it automatically remove the error without refreshing the page.</p>
