This is Script for error display
<script type="text/javascript" language=javascript>
function valid()
{
var Name = document.getElementById('name');
if (Name.value == '' || Name.value == "null") {
document.getElementById('lblName').innerHTML = "Enter Your Name";
} else {
var re = /^[a-zA-Z]+$/;
if (!Name.value.match(re)) {
document.getElementById('lblName').innerHTML = "Enter Valid Name";
}
else {
document.getElementById('lblName').innerHTML = "";
}
}
}
</script>
HTML
<tr style="padding-top:15px">
<td style="color: #595627;font-size:12;font-family:verdana; font-weight:normal;">Name
</td>
<td><input type="text" value="" name="username" id="name" style="width:230px"/></td>
</tr>
<tr>
<td colspan="2"><label id="lblName" style="padding-left:80px; color:red;font-size:12;font-family:verdana; font-weight:normal;" ></label> </td>
</tr>