I am working with a gridview
<asp:gridview ID="Gridview1" runat="server" ShowFooter="true" CssClass="vutblrow" TabIndex="3" HeaderStyle-CssClass="vutblhdr" CellPadding="4" ForeColor="#333333" GridLines="None" Width="25%" PagerStyle-Mode="NumericPages"
AutoGenerateColumns="false" onrowcreated="Gridview1_RowCreated" Height="16px">
<PagerStyle CssClass="pgr" Height="25px" BorderStyle="Solid" />
<Columns>
<asp:BoundField DataField="RowNumber" HeaderText="Serial Number" />
<asp:TemplateField HeaderText="Air/Bus/Train Fare">
<ItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" CssClass="txtBoxNormalmedium" ></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="City To">
<ItemTemplate>
<asp:TextBox ID="TextBox2" runat="server" CssClass="txtBoxNormalmedium" ></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="City From">
<ItemTemplate>
<asp:TextBox ID="TextBox3" runat="server" CssClass="txtBoxNormalmedium"></asp:TextBox>
</ItemTemplate>
<FooterStyle HorizontalAlign="Right" />
<FooterTemplate>
<asp:Button ID="ButtonAdd" runat="server" Text="Add New Row"
onclick="ButtonAdd_Click" CssClass="btnNormalAdd" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="LinkButton1" runat="server" onclick="LinkButton1_Click" CssClass="lnkbut">Remove</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:gridview>
<asp:Label ID="lblgpf14" runat="server" CssClass="lblText " Text="Total Air Fare"></asp:Label>
<asp:TextBox ID="txt" runat="server" CssClass="txtBoxNormalmedium" Enabled="False" onkeyup="Calculate();"></asp:TextBox>
As users input the air/bus/train fare, the value should be displayed in the textbox labeled "txt". The javascript function should be triggered by the onkeyup event. This textbox is located outside the gridview. When the user clicks on "Add new row" and enters the train fare, the total value must be shown in the "txt" textbox. I'm struggling to write the JavaScript code for this functionality. Can someone please assist me?