title: Close the alert javascript without refresh page using Codeigniter 3
body: <p>I build form which validation using javascript and Codeigniter 3.04. here is my HTML code </p>
  
  <pre><code>&lt;form class="form-horizontal"  method="POST" onsubmit="check()"&gt;
    //code
  &lt;/form&gt;
  </code></pre>
  
  <p>I will check length character in my function javascript before insert into database. here my function </p>
  
  <pre><code>function check(){
      var title = document.getElementById('txt_check').value.length;
      if (title &lt;= 50) {
        alert("The title length less than 50 Character ");    
      }
  }
  </code></pre>
  
  <p>When alert show, and then I click OK, all data in my previous form is clear, so I must write it again. When I using Codeigniter 2.00, it doesn't happen, but in this new version, everything refresh, I think all cache was reset. Can you help me to remove this "refresh" only this page.</p>
  
  <p>Thanks</p>