I build form which validation using javascript and Codeigniter 3.04. here is my HTML code 

```
<form class="form-horizontal"  method="POST" onsubmit="check()">
  //code
</form>

```

I will check length character in my function javascript before insert into database. here my function 

```
function check(){
    var title = document.getElementById('txt_check').value.length;
    if (title <= 50) {
      alert("The title length less than 50 Character ");    
    }
}

```

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.

Thanks