Abraham Olatubosun

Abraham Olatubosun

  • NA
  • 471
  • 113.7k

JavaScript Function Double Summing

Feb 22 2017 3:54 PM
Dear code masters,
thank you for all previous support it made me rock stand in coding. However, i have a current challenge where we enter data's into the following textboxes "Age (<1) Age (1-4)" like that till it get to Age (50>), we do this for Male and Female.
The data's we enter should also display on the textboxes under the red background label only if these textboxes are empty but if they are not empty and greater than or equal to zero then, the textboxes above will sum up to their equiverlent textboxes bellow the red background that is what we want.
but the opposit is the case see the picture attached.
i have javascript at the top of the ASPX pages as shown bellow :
  1. <!-- Inject Script Filtered -->  

we then have these functions linked to each textboxes like bellow :
 
  1. <td>  
  2.                                                        <asp:TextBox ID="TextBox651" runat="server" Width="52px" onKeyUp="sumUpHTC3A()">asp:TextBox>  
  3.                                                    td>  
  4.                                                    <td>  
  5.                                                        <asp:TextBox ID="TextBox652" runat="server" Width="52px" onKeyUp="sumUpHTC3B()">asp:TextBox>  
  6.                                                    td>  
  7.                                                    <td>  
  8.                                                        <asp:TextBox ID="TextBox653" runat="server" Width="52px" onKeyUp="sumUpHTC3C()">asp:TextBox>  
  9.                                                    td>  
  10.                                                    <td>  
  11.                                                        <asp:TextBox ID="TextBox654" runat="server" Width="52px" onKeyUp="sumUpHTC3D()">asp:TextBox>  
  12.                                                    td>  
  13.                                                    <td>  
  14.                                                        <asp:TextBox ID="TextBox655" runat="server" Width="52px" onKeyUp="sumUpHTC3E()">asp:TextBox>  
  15.                                                    td>  
  16.                                                    <td>  
  17.                                                        <asp:TextBox ID="TextBox656" runat="server" Width="52px" onKeyUp="sumUpHTC3F()">asp:TextBox>  
  18.                                                    td>  
  19.                                                    <td>  
  20.                                                        <asp:TextBox ID="TextBox657" runat="server" Width="52px" onKeyUp="sumUpHTC3G()">asp:TextBox>  
  21.                                                    td>  
  22.                                                    <td>  
  23.                                                        <asp:TextBox ID="TextBox658" runat="server" AutoPostBack="False"  Width="52px"  onKeyUp="sumUpHTC3H()">asp:TextBox>  
  24.                                        <td>  
  25.                                                        <asp:TextBox ID="TextBox660" runat="server" Width="52px" onKeyUp="sumUpHTC3I()">asp:TextBox>  
  26.                                                    td>  
  27.                                                    <td>  
  28.                                                        <asp:TextBox ID="TextBox661" runat="server" Width="52px" onKeyUp="sumUpHTC3J()">asp:TextBox>  
  29.                                                    td>  
  30.                                                    <td>  
  31.                                                        <asp:TextBox ID="TextBox662" runat="server" Width="52px" onKeyUp="sumUpHTC3K()">asp:TextBox>  
  32.                                                    td>  
  33.                                                    <td>  
  34.                                                        <asp:TextBox ID="TextBox663" runat="server" Width="52px" onKeyUp="sumUpHTC3L()">asp:TextBox>  
  35.                                                    td>  
  36.                                                    <td>  
  37.                                                        <asp:TextBox ID="TextBox664" runat="server" Width="52px" onKeyUp="sumUpHTC3M()">asp:TextBox>  
  38.                                                    td>  
  39.                                                    <td>  
  40.                                                        <asp:TextBox ID="TextBox665" runat="server" Width="52px" onKeyUp="sumUpHTC3N()">asp:TextBox>  
  41.                                                    td>  
  42.                                                    <td>  
  43.                                                        <asp:TextBox ID="TextBox666" runat="server" Width="52px" onKeyUp="sumUpHTC3O()">asp:TextBox>  
  44.                                                    td>  
  45.                                                    <td>  
  46.                                                                              <asp:TextBox ID="TextBox667" runat="server" AutoPostBack="False"  Width="52px" onKeyUp="sumUpHTC3P()" >asp:TextBox>  
 please i tried to explain the situation as best as i can, if you understand my challenge please i need your help

Answers (8)