Populate and check for numeric-only textbox
<p>I have two text boxes, I need to populate value of one text box to another textbox and value entered in textbox should be numeric only.</p>

<pre><code>/* for numeric value in one textbox and populate in another*/

function onType(evt){
var charCode = (evt.which) ? evt.which : event.keyCode
if (charCode &gt; 31 &amp;&amp; (charCode &lt; 48 || charCode &gt; 57)){ 
return false;
}
else{
document.getElementById("marketValuationId").value=document.getElementById("valuationId").value;
return true;
}
</code></pre>
