<form action="start.do" method="post" name="login" onSubmit="formPost('loginsubmit.do', v); return false;">
<input type="text" name="login" size="35" class="ctrl">
<input type="text" name="password" size="35" class="ctrl">
<script>var v = new validator('login', a_fields, o_config);</script>
<input type="submit" name="Submit" value="Submit" class="btnform">
</form>`

My problem eval execute validator script but it does not update v of formPost argument. this data come from ajax response and add to div by document.getElementById.innerHTML. this page loads smoothly but when click submit button v is undefined. how i solve this problem to update v according v after running script