<table>
<tbody id="add_weight">
<tr></tr>
</tbody>
</table>
<a onClick="edit_weights()" style="text-decoration:none !important;"><span style="cursor:pointer; font-size:10px;">+Add more Weights.</span></a><br/><br/>
on page load there is no textbox but when i click on anchor tag a textbox opens for that i have applied a function...
<script type="text/javascript">
var b=1;
function edit_weights() {
if (b==10) {
alert("can't Add more than 10 Weight Rates");
return false;
}
var table=document.getElementById("add_weight");
var row=table.insertRow(b);
var cell1=row.insertCell(0);
cell1.innerHTML="<input type='text' id='edit_weight_from"+b+"' name='edit_weight_from"+b+"' style='width:100px; height:22px; float:left; margin:0px 0px 0px 0px;'/>";
b=b+1;
}
</script>
now everytime i click on anchor tag a new textbox comes...now what i want is that when i try to enter alphabet in this textbox it should not take it .and when i enter number then it should take it so is there any way to do it??