php - jquery validaton near the label itself -


js code:

<script type="text/javascript">     function validate() {        if($('#usr_name').val()==''){          alert('enter 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 format validation in jquery. showing alert message. require has place enter name beside label when not filled possible. if how this. me thanks.

search jquery validation plugins, lot of them available in net

ref: http://jqueryvalidation.org/documentation/

demo : http://jquery.bassistance.de/validate/demo/


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

node.js - Node - Passport Auth - Authed Post Route hangs on form submission -

Does Firefox offer AppleScript support to get URL of windows? -