ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.Filter data in HTML Table with multiple DropDownList in jQuery<p>Hi&nbsp;jovceka,</p> <p>Check this example. Now please take its reference and correct your code.</p> <p><strong><span style="text-decoration: underline;">HTML</span></strong></p> <div class="demo_block"> <pre class="brush: html">&lt;script type=&#34;text/javascript&#34; src=&#34;https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js&#34;&gt;&lt;/script&gt; &lt;script type=&#34;text/javascript&#34;&gt; $(document).ready(function () { $(&#34;#ddlCountry,#ddlAge&#34;).on(&#34;change&#34;, function () { var country = $(&#39;#ddlCountry&#39;).find(&#34;option:selected&#34;).val(); var age = $(&#39;#ddlAge&#39;).find(&#34;option:selected&#34;).val(); SearchData(country, age) }); }); function SearchData(country, age) { if (country.toUpperCase() == &#39;ALL&#39; &amp;&amp; age.toUpperCase() == &#39;ALL&#39;) { $(&#39;#table11 tbody tr&#39;).show(); } else { $(&#39;#table11 tbody tr:has(td)&#39;).each(function () { var rowCountry = $.trim($(this).find(&#39;td:eq(1)&#39;).text()); var rowAge = $.trim($(this).find(&#39;td:eq(2)&#39;).text()); if (country.toUpperCase() != &#39;ALL&#39; &amp;&amp; age.toUpperCase() != &#39;ALL&#39;) { if (rowCountry.toUpperCase() == country.toUpperCase() &amp;&amp; rowAge == age) { $(this).show(); } else { $(this).hide(); } } else if ($(this).find(&#39;td:eq(1)&#39;).text() != &#39;&#39; || $(this).find(&#39;td:eq(1)&#39;).text() != &#39;&#39;) { if (country != &#39;all&#39;) { if (rowCountry.toUpperCase() == country.toUpperCase()) { $(this).show(); } else { $(this).hide(); } } if (age != &#39;all&#39;) { if (rowAge == age) { $(this).show(); } else { $(this).hide(); } } } }); } } &lt;/script&gt; &lt;select class=&#34;cl_country&#34; id=&#34;ddlCountry&#34;&gt; &lt;option value=&#34;all&#34;&gt;Select Class &lt;/option&gt; &lt;option value=&#34;India&#34;&gt;india&lt;/option&gt; &lt;option value=&#34;usa&#34;&gt;usa&lt;/option&gt; &lt;option value=&#34;uk&#34;&gt;uk&lt;/option&gt; &lt;/select&gt; &lt;select class=&#34;cl_age&#34; id=&#34;ddlAge&#34;&gt; &lt;option value=&#34;all&#34;&gt;Select Class &lt;/option&gt; &lt;option value=&#34;50&#34;&gt;50&lt;/option&gt; &lt;option value=&#34;60&#34;&gt;60&lt;/option&gt; &lt;option value=&#34;80&#34;&gt;80&lt;/option&gt; &lt;/select&gt; &lt;table style=&#34;width: 100%&#34; id=&#34;table11&#34; border=&#34;1&#34;&gt; &lt;tr&gt; &lt;th&gt;name&lt;/th&gt; &lt;th&gt;country&lt;/th&gt; &lt;th&gt;Age&lt;/th&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Jill&lt;/td&gt; &lt;td&gt;USA&lt;/td&gt; &lt;td&gt;50&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Eve&lt;/td&gt; &lt;td&gt;UK&lt;/td&gt; &lt;td&gt;50&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;John&lt;/td&gt; &lt;td&gt;INDIA&lt;/td&gt; &lt;td&gt;80&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;sam&lt;/td&gt; &lt;td&gt;AUSTRALIA&lt;/td&gt; &lt;td&gt;80&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;joe&lt;/td&gt; &lt;td&gt;INDIA&lt;/td&gt; &lt;td&gt;60&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;alan&lt;/td&gt; &lt;td&gt;USA&lt;/td&gt; &lt;td&gt;60&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;</pre> </div> <p><a class="demo button orange btn btn-red">Demo</a></p>https://www.aspforums.net:443/Threads/187399/Filter-data-in-HTML-Table-with-multiple-DropDownList-in-jQuery/https://www.aspforums.net:443/Threads/187399/Filter-data-in-HTML-Table-with-multiple-DropDownList-in-jQuery/Fri, 28 Jun 2019 07:07:56 GMT