JS Code:
<script type="text/javascript">
function validate() {
if($('#usr_name').val()==''){
alert('Enter Your Name!!!');
$('#usr_name').focus();
return false;
}
</script>
HTML code:
<div class="label_left"><label>Name :</label></div>
<div class="text_right">
<input type="text" name="usr_name" id="usr_name" value="" size="30" /><br /><br />
</div>
am using this format to validation in jquery. it is showing an alert message. but what i require is it has to place enter your name beside the label when it is not filled is it possible. if so how to do this. help me thanks.