| Author: Meena Mehra 05 Nov 2008 | Member Level: Gold | Rating:   Points: 3 |
u can call this javascript function in onchange property of these three textboxes like--- <asp:TextBox ID="TextBox " runat="server" CssClass="cssTextInputNum" MaxLength="10" Width="75px" onchange="Fn_Add();"></asp:TextBox>
|
| Author: ABCDE 05 Nov 2008 | Member Level: Gold | Rating:  Points: 5 |
Hi Seenivas,
You need to have a function that runs onchange. That way, when a value changes, the function is triggered and will recalculate the values.
For example:
<script type="text/javascript"> function recalc() { // code to check textbox 1 . . .
// code to check textbox 2 . . .
// code to check textbox 3 . . .
// add them up, change the text document.getElementById("TextBox4").value = tb1+tb2+tb3; } </script> <input id="TextBox4" type="text" value="" onChange="java script:recalc();" />
Thanks
|