Tosif Ali

Tosif Ali

  • 1.7k
  • 11
  • 408

Getting some error on calling jQuery function

Jan 8 2020 3:59 AM
this is my html code
  1. <div class="panel panel-default" style="margin-left:12px;margin-right:24px;">  
  2. <div id="Tabs" role="tabpanel">  
  3. <ul class="nav nav-tabs" role="tablist">  
  4. <%--<li class="active"><a href="#personal" aria-controls="personal" role="tab" data-toggle="tab">Dispatched Booklets</a></li>  
  5. <li><a href="#employment" aria-controls="employment" role="tab" data-toggle="tab">Recieved Booklets</a></li>--%>  
  6. <asp:Label ID="PageName" Text="Country Admin Dashboard" runat="server" Font-Bold="True" Font-Size="X-Large"></asp:Label><br /><br />  
  7. <li class="active"><a href="#employment" aria-controls="employment" role="tab" data-toggle="tab">MA HQ Received Booklets From IPPFARO</a></li>  
  8. <li><a href="#personal" aria-controls="personal" role="tab" data-toggle="tab">MA HQ Dispatched Booklets To MA Branch</a></li>  
  9. <li><a href="#stockRecord" aria-controls="stockRecord" role="tab" data-toggle="tab">Stock Control</a></li>  
  10. </ul>  
  11. <div class="tab-content" style="padding-top: 20px">  
  12. <div role="tabpanel" class="tab-pane" id="personal">  
  13. <div style="height: 1100px; width: 1300px; overflow: auto; float: right">  
  14. <div class="content">  
  15. <div class="search col-sm-12 col-xs-12">  
  16. <asp:LinkButton ID="lnkBtnAssign" class="dropdown-toggle" data-toggle="modal" data-target="#countryadmin" runat="server" Text="Allocate" CssClass="btn btn-info"></asp:LinkButton>  
  17. <asp:LinkButton ID="LinkButtonreassign" class="dropdown-toggle" data-toggle="modal" data-target="#branchadminreallocate" runat="server" Text="Pull Back" CssClass="btn btn-info" Style="margin-right: 10px;"></asp:LinkButton>  
  18. </div>  
  19. <div class="container-fluid">  
  20. <asp:GridView ID="DisPatchCountryGrid" AutoGenerateColumns="False" runat="server" class="mark_printed" ClientIDMode="Static" ShowHeaderWhenEmpty="true">  
  21. <Columns>  
  22. <asp:BoundField DataField="ClientId" HeaderText="ClientId" ItemStyle-CssClass="hiddencol" HeaderStyle-CssClass="hiddencol" />  
  23. <asp:BoundField DataField="CountryID" HeaderText="CountryID" ItemStyle-CssClass="hiddencol" HeaderStyle-CssClass="hiddencol" />  
  24. <asp:BoundField DataField="Batch No." HeaderText="Batch No." />  
  25. <asp:BoundField DataField="ClientName" HeaderText="Client Name" />  
  26. <asp:BoundField DataField="CountryName" HeaderText="Country Name" />  
  27. <asp:BoundField DataField="Total No Of Booklets" HeaderText="No of Booklets in Stock" />  
  28. <asp:BoundField DataField="BookletNo Range" HeaderText="Booklets Range" />  
  29. <asp:BoundField DataField="Total No Of Vouchers" HeaderText="Total No Of Vouchers" />  
  30. <asp:BoundField DataField="SerialNumber Range" HeaderText="SerialNumber Range" />  
  31. <asp:BoundField DataField="Date Recived" HeaderText="Date Received" />  
  32. <asp:BoundField DataField="Recived Status" HeaderText="Received Status" />  
  33. </Columns>  
  34. <%-- <EmptyDataTemplate>No Record Available</EmptyDataTemplate>--%>  
  35. </asp:GridView>  
  36. </div>  
  37. </div>  
  38. </div>  
  39. <asp:ScriptManager ID="ScriptManager1" runat="server" />  
  40. <div class="modal fade" id="countryadmin" role="dialog">  
  41. <div class="modal-dialog modal-md">  
  42. <div class="modal-content">  
  43. <div class="modal-header" style="background: #57C7C3; padding: 10px;">  
  44. <button type="button" class="close" data-dismiss="modal" style="background: rgba(0,0,0,.4); padding: 1px 3px;">×</button>  
  45. <h5 class="modal-title" style="font-weight: bold; color: #fff;">Allocate Booklets To MA Branch</h5>  
  46. </div>  
  47. <div class="modal-body" style="text-align: center;">  
  48. <div class="div1"></div>  
  49. <asp:UpdatePanel ID="updatepanelpopup" runat="server">  
  50. <ContentTemplate>  
  51. <div class="row">  
  52. <div class="col-md-12" style="text-align: left;">  
  53. <div class="form-group row">  
  54. <label class="control-label col-md-4" for="Client Name">Client Name</label>  
  55. <div class="col-sm-6">  
  56. <asp:DropDownList ID="ddlclient" runat="server" OnSelectedIndexChanged="ddlclient_SelectedIndexChanged" AutoPostBack="true" DataValueField="ClientID" AppendDataBoundItems="true" Style="width: 170px; height: 24px;"></asp:DropDownList>  
  57. <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="ddlclient" ErrorMessage="*select Client" ForeColor="Red"></asp:RequiredFieldValidator>  
  58. </div>  
  59. </div>  
  60. </div>  
  61. </div>  
  62. <div class="row">  
  63. <div class="col-md-12" style="text-align: left;">  
  64. <div class="form-group row">  
  65. <label class="control-label col-md-4" for="Country Name">Country Name</label>  
  66. <div class="col-sm-6">  
  67. <asp:DropDownList ID="ddlcountry" runat="server" OnSelectedIndexChanged="ddlcountry_SelectedIndexChanged" AutoPostBack="true" DataValueField="CountryID" AppendDataBoundItems="true" Style="width: 170px; height: 24px;"></asp:DropDownList>  
  68. <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="ddlcountry" ErrorMessage="*select country" ForeColor="Red"></asp:RequiredFieldValidator>  
  69. </div>  
  70. </div>  
  71. </div>  
  72. </div>  
  73. <div class="row">  
  74. <div class="col-md-12" style="text-align: left;">  
  75. <div class="form-group row">  
  76. <label class="control-label col-md-4" for="Branch Name">Branch Name</label>  
  77. <div class="col-sm-6">  
  78. <asp:DropDownList ID="ddlbranch" runat="server" OnSelectedIndexChanged="ddlbranch_SelectedIndexChanged" AutoPostBack="true" DataValueField="ClientCountryBranchId" AppendDataBoundItems="true" Style="width: 170px; height: 24px;"></asp:DropDownList>  
  79. <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="ddlbranch" ErrorMessage="*select branch" ForeColor="Red"></asp:RequiredFieldValidator>  
  80. </div>  
  81. </div>  
  82. </div>  
  83. </div>  
  84. <div class="row">  
  85. <div class="col-md-12" style="text-align: left;">  
  86. <div class="form-group row">  
  87. <label class="control-label col-md-4" for="Dispatch Booklets From">Dispatch Booklets From</label>  
  88. <div class="col-sm-6">  
  89. <asp:DropDownList ID="ddlfrm" runat="server" AppendDataBoundItems="true" Style="width: 170px; height: 24px;"></asp:DropDownList>  
  90. </div>  
  91. </div>  
  92. </div>  
  93. </div>  
  94. <div class="row">  
  95. <div class="col-md-12" style="text-align: left;">  
  96. <div class="form-group row">  
  97. <label class="control-label col-md-4" for="Dispatch Booklets To">Dispatch Booklets To</label>  
  98. <div class="col-sm-6">  
  99. <asp:DropDownList ID="ddlto" runat="server" AppendDataBoundItems="true" Style="width: 170px; height: 24px;"></asp:DropDownList>  
  100. </div>  
  101. </div>  
  102. </div>  
  103. </div>  
  104. </ContentTemplate>  
  105. </asp:UpdatePanel>  
  106. <div class="modal-footer" style="text-align: center;">  
  107. <asp:Button ID="Button2" CssClass="button" Style="background: #57C7C3; color: #fff; border: 0;" runat="server" Text="Allocate" CausesValidation="false" OnClick="btndispatch_Click" />  
  108. <asp:Button ID="btnClose" runat="server" Text="Close" CssClass="button" Style="background: #4d4d4d; color: #fff; border: 0;" CausesValidation="false" />  
  109. </div>  
  110. </div>  
  111. </div>  
  112. </div>  
  113. </div>  
  114. <div class="modal fade" id="branchadminreallocate" role="dialog">  
  115. <div class="modal-dialog modal-md">  
  116. <div class="modal-content">  
  117. <div class="modal-header" style="background: #57C7C3; padding: 10px;">  
  118. <button type="button" class="close" data-dismiss="modal" style="background: rgba(0,0,0,.4); padding: 1px 3px;">×</button>  
  119. <h5 class="modal-title" style="font-weight: bold; color: #fff;">Allocate Booklets To Volunteers</h5>  
  120. </div>  
  121. <div class="modal-body" style="text-align: center;">  
  122. <div class="div1"></div>  
  123. <asp:UpdatePanel ID="updatepanel1" runat="server">  
  124. <ContentTemplate>  
  125. <div class="row">  
  126. <div class="col-md-12" style="text-align: left;">  
  127. <div class="form-group row">  
  128. <label class="control-label col-md-4" for="Client Name">Client Name</label>  
  129. <div class="col-sm-6">  
  130. <asp:DropDownList ID="ddlclientreassin" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlclientreassin_SelectedIndexChanged" DateValueField="ClientID" AppendDataBoundItems="true" Style="width: 170px; height: 24px;"></asp:DropDownList>  
  131. <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="*select client" ForeColor="Red" ControlToValidate="ddlclient"></asp:RequiredFieldValidator>  
  132. </div>  
  133. </div>  
  134. </div>  
  135. </div>  
  136. <div class="row">  
  137. <div class="col-md-12" style="text-align: left;">  
  138. <div class="form-group row">  
  139. <label class="control-label col-md-4" for="Country Name">Country Name</label>  
  140. <div class="col-sm-6">  
  141. <asp:DropDownList ID="ddlcountryreassign" runat="server" OnSelectedIndexChanged="ddlcountryreassign_SelectedIndexChanged" AutoPostBack="true" DataValueField="CountryID" AppendDataBoundItems="true" Style="width: 170px; height: 24px;"></asp:DropDownList>  
  142. <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="ddlcountry" ErrorMessage="*select country" ForeColor="Red"></asp:RequiredFieldValidator>  
  143. </div>  
  144. </div>  
  145. </div>  
  146. </div>  
  147. <div class="row">  
  148. <div class="col-md-12" style="text-align: left;">  
  149. <div class="form-group row">  
  150. <label class="control-label col-md-4" for="Volunteer Name">Batch Number</label>  
  151. <div class="col-sm-6">  
  152. <asp:DropDownList ID="ddlbatch" runat="server" AutoPostBack="true" DataValueField="BatchNo" AppendDataBoundItems="true" Style="width: 170px; height: 24px;" OnSelectedIndexChanged="ddlbatch_SelectedIndexChanged"></asp:DropDownList>  
  153. </div>  
  154. </div>  
  155. </div>  
  156. </div>  
  157. <div class="row">  
  158. <div class="col-md-12" style="text-align: left;">  
  159. <div class="form-group row">  
  160. <label class="control-label col-md-4" for="Dispatch Booklets From">Dispatch Booklets From</label>  
  161. <div class="col-sm-6">  
  162. <asp:DropDownList ID="ddlbookletsreassignfrom" runat="server" AppendDataBoundItems="true" Style="width: 170px; height: 24px;"></asp:DropDownList>  
  163. </div>  
  164. </div>  
  165. </div>  
  166. </div>  
  167. <div class="row">  
  168. <div class="col-md-12" style="text-align: left;">  
  169. <div class="form-group row">  
  170. <label class="control-label col-md-4" for="Dispatch Booklets To">Dispatch Booklets To</label>  
  171. <div class="col-sm-6">  
  172. <asp:DropDownList ID="ddlbookletsreassignto" runat="server" AppendDataBoundItems="true" Style="width: 170px; height: 24px;"></asp:DropDownList>  
  173. </div>  
  174. </div>  
  175. </div>  
  176. </div>  
  177. </ContentTemplate>  
  178. </asp:UpdatePanel>  
  179. <div class="modal-footer" style="text-align: center;">  
  180. <asp:Button ID="btnreassign" CssClass="button" Style="background: #57C7C3; color: #fff; border: 0;" runat="server" Text="Allocate" OnClick="btnreassign_Click" CausesValidation="false" />  
  181. <asp:Button ID="btncancelreassign" runat="server" Text="Close" CssClass="button" Style="background: #4d4d4d; color: #fff; border: 0;" CausesValidation="false" />  
  182. </div>  
  183. </div>  
  184. </div>  
  185. </div>  
  186. </div>  
  187. </div>  
  188. <div role="tabpanel" class="tab-pane active" id="employment">  
  189. <div style="height: 1100px; width: 1300px; overflow: auto; float: right">  
  190. <div class="content">  
  191. <div class="search col-sm-8 col-xs-9">  
  192. </div>  
  193. <div class="container-fluid">  
  194. <asp:GridView ID="ReciveCountryGrid" AutoGenerateColumns="False" runat="server" class="mark_printed" ClientIDMode="Static" ShowHeaderWhenEmpty="true">  
  195. <Columns>  
  196. <asp:BoundField DataField="ClientId" HeaderText="ClientId" ItemStyle-CssClass="hiddencol" HeaderStyle-CssClass="hiddencol" />  
  197. <asp:BoundField DataField="CountryID" HeaderText="CountryID" ItemStyle-CssClass="hiddencol" HeaderStyle-CssClass="hiddencol" />  
  198. <asp:BoundField DataField="Batch No." HeaderText="Batch No." />  
  199. <asp:BoundField DataField="ClientName" HeaderText="Client Name" />  
  200. <asp:BoundField DataField="CountryName" HeaderText="Country Name" />  
  201. <asp:BoundField DataField="Total No Of Booklets" HeaderText="No of Booklets Received" />  
  202. <asp:BoundField DataField="BookletNo Range" HeaderText="Booklets Range" />  
  203. <asp:BoundField DataField="Total No Of Vouchers" HeaderText="Total No Of Vouchers" />  
  204. <asp:BoundField DataField="SerialNumber Range" HeaderText="SerialNumber Range" />  
  205. <asp:BoundField DataField="Date Recived" HeaderText="Date Received" />  
  206. <asp:BoundField DataField="Recived Status" HeaderText="Received Status" />  
  207. <asp:TemplateField>  
  208. <HeaderTemplate>Action</HeaderTemplate>  
  209. <ItemTemplate>  
  210. <asp:Button ID="Acknowledge" runat="server" Text="Acknowledge" CssClass="btn btn-primary" OnClick="Acknowledge_Click" CausesValidation="false" />  
  211. </ItemTemplate>  
  212. </asp:TemplateField>  
  213. </Columns>  
  214. <%-- <EmptyDataTemplate>No Record available</EmptyDataTemplate>--%>  
  215. </asp:GridView>  
  216. </div>  
  217. </div>  
  218. </div>  
  219. </div>  
  220. <div role="tabpanel" class="tab-pane" id="stockRecord">  
  221. <div style="height: 1100px; width: 1310px; overflow: auto; float: right">  
  222. <div class="content">  
  223. <div class="search col-sm-12 col-xs-12">  
  224. <div class="row" style="color:red; font-size:medium;">  
  225. <div class="col-sm-2 col-md-4"> Select Country :</div>  
  226. <div class="col-sm-2 col-md-4"> Select Branch :</div>  
  227. <div class="col-sm-2 col-md-4"> Stock Status :</div>  
  228. </div>  
  229. <div class="row" style="color:red; font-size:medium;">  
  230. <div class="col-md-4"> <asp:DropDownList ID="ddlCon" runat="server" OnSelectedIndexChanged="ddlcon_SelectedIndexChanged" AutoPostBack="true" AppendDataBoundItems="true" ClientIDMode="Static" DataTextField="Select Country"></asp:DropDownList> </div>  
  231. <div class="col-md-4"> <asp:DropDownList ID="ddlBrn" runat="server" OnSelectedIndexChanged="ddlbrn_SelectedIndexChanged" AutoPostBack="false" AppendDataBoundItems="true" ClientIDMode="Static" DataTextField="Select Branch"></asp:DropDownList> </div>  
  232. <div class="col-md-3"> <asp:DropDownList ID="ddlstatus" runat="server" ClientIDMode="Static">  
  233. <asp:ListItem Value="-1">In & Out</asp:ListItem>  
  234. <asp:ListItem Value="0">In</asp:ListItem>  
  235. <asp:ListItem Value="1">Out</asp:ListItem>  
  236. </asp:DropDownList> </div>  
  237. <div class="col-md-1"> <button class="btn btn-danger" id="btnsearch" onclick="FilterData" runat="server">Search</button> </div>  
  238. </div>  
  239. </div>  
  240. <div class="row">  
  241. <div class="col-md-3">  
  242. <asp:Label ID="lblBranchName" Text="Branch :" runat="server" Font-Bold="True" Font-Size="Small"></asp:Label>  
  243. <asp:TextBox ID="txtBranchName" ReadOnly="true" Text="All" runat="server"></asp:TextBox>  
  244. </div>  
  245. <div class="col-md-3">  
  246. <asp:Label ID="Label1" Text="Stock In :" runat="server" Font-Bold="True" Font-Size="Small"></asp:Label>  
  247. <asp:TextBox ID="txtstockin" ReadOnly="true" Text="00" runat="server"></asp:TextBox>  
  248. </div>  
  249. <div class="col-md-3">  
  250. <asp:Label ID="Label3" Text="Stock OUT :" runat="server" Font-Bold="True" Font-Size="Small"></asp:Label>  
  251. <asp:TextBox ID="txtstockout" ReadOnly="true" Text="00" runat="server"></asp:TextBox>  
  252. </div>  
  253. <div class="col-md-3">  
  254. <asp:Label ID="Label2" Text="Balance :" runat="server" Font-Bold="True" Font-Size="Small"></asp:Label>  
  255. <asp:TextBox ID="txtbalance" ReadOnly="true" Text="00" runat="server"></asp:TextBox>  
  256. </div>  
  257. </div><br />  
  258. <!-- Dispatched grid -->  
  259. <div class="container-fluid">  
  260. <asp:GridView ID="CountryStockControlGridView" Width="1310px" CellPadding="4" AutoGenerateColumns="False" runat="server" class="mark_printed" ClientIDMode="Static" ShowHeaderWhenEmpty="true">  
  261. <Columns>  
  262. <asp:BoundField DataField="BatchNo" HeaderText="Batch No." />  
  263. <asp:BoundField DataField="ClientCountryBranchName" HeaderText="Branch Name" />  
  264. <asp:BoundField DataField="StockStatus" HeaderText="Received Status" />  
  265. <asp:BoundField DataField="NoOfBooklets" HeaderText="No of Booklets " />  
  266. <asp:BoundField DataField="TotalVouchers" HeaderText="Total No Of Vouchers" />  
  267. <asp:BoundField DataField="SerialRange" HeaderText="Serial Number Range" />  
  268. <asp:BoundField DataField="CreateDate" HeaderText="Date Received" />  
  269. </Columns>  
  270. <%-- <EmptyDataTemplate>No Record Available</EmptyDataTemplate>--%>  
  271. </asp:GridView>  
  272. </div>  
  273. <asp:HiddenField ID="TabName" runat="server" />  
  274. </div>  
  275. </div>  
  276. </div>  
  277. </div>  
  278. </div>  
  279. </div>
my script
  1. <script type="text/javascript">  
  2. // var jquery = jQuery.noConflict();  
  3. $(function () {  
  4. var tabName = $("[id*=TabName]").val() != "" ? $("[id*=TabName]").val() : "employment";  
  5. $('#Tabs a[href="#' + tabName + '"]').tab('show');  
  6. $("#Tabs a").click(function () {  
  7. $("[id*=TabName]").val($(this).attr("href").replace("#"""));  
  8. });  
  9. });  
  10. </script>
and error is
 
Uncaught TypeError: $(...).tab is not a function
at HTMLDocument.<anonymous> (CountryAdmin.aspx:1409)
at fire (jquery-1.7.1.js:1046)
at Object.fireWith (jquery-1.7.1.js:1164)
at Function.ready (jquery-1.7.1.js:435)
at HTMLDocument.DOMContentLoaded (jquery-1.7.1.js:923)
 
i did not understand why i get this error

Answers (1)