title: Onblur or onchange check, using a php function in a registration form
body: <p>I would like to be able to check the text in a text-box after it has changed, and report what is wrong.
  It is for a registration form.</p>
  
  <p>This is a part of register.php where </p>
  
  <pre><code>&lt;form action"" method="post"&gt;
  &lt;ul class="ul-reg"&gt;
  &lt;li&gt;
  &lt;p&gt;Username: &lt;/p&gt;&lt;input name="username-field" type="text" onblur="someFunction()" /&gt;&lt;span id="UsernamehelpText"&gt;      &lt;/span&gt;
  &lt;/li&gt;
  &lt;/ul&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Then I would have a registerfunctions.php where i would store all the functions for checking lenght,char,maybe regex etc.. Its not really that important what functions i call. I just don't know how to call them.</p>
  
  <p>Form what i have seen the span is where u post the errors, but if there is any other option im open for it, all i want is to be able to post the erorr text in the same line as the text-box</p>
  
  <p>I have checked JavaScript and AJAX, but I am pretty new in this and don't really understand how it works.</p>