hello techies,
lets see how to add two values from two different textboxes and display in third textbox...write the following code and check yourself
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script type="text/javascript" language="javascript ">
function adding()
{
var a = document.getElementById("text1").value;
var b = document.getElementById("text2").value;
var c = parseInt(a)+ parseInt(b);
document.getElementById("text3").value = c;
//document.write("parseInt(a)+b = "+c);
}
</script>
first number
<input id="text1" onchange="adding()" />
<br />
<br />
Second Number
<input id="text2" onchange="adding()" />
<br />
<br />
result
<input id="text3" />
</asp:Content>
thanks
ankit saxena