title: form validation for text input with default values
body: <p>I have a form with 10 input textboxes and each of them have a default value like 'First Name', 'Last Name'. I used onblur and onfocus on these elements since there was no description beside the textbox to indicate what each box is for. Sample code:</p>
  
  <pre><code>    &lt;input type="text" id="o_fname" name="o_fname" value="&lt;?php if (isset($_POST['o_fname']) ) echo $_POST['o_fname']; else echo 'First Name'; ?&gt;" tabindex="1" size="36" style="background:#000000;color:#8e8e8e;border-color:#D8D8D8;height:22px;width:200px;" onFocus="if
  (this.value==this.defaultValue) this.value=''; " onBlur="if(this.value=='') this.value=this.defaultValue;"&gt;
  </code></pre>
  
  <p>I want to validate this form on the same page, i tried my jquery stuff but the problem was that the textbox had a default value and jquery was assuming that something was entered into the box and i was not validating properly... any suggestions as to how can i validate this page dynamically so that user cannot submit the form unless he enters all the fields?</p>