title: Javascript file overiding another javascript file
body: <p>Is there any way to select all checkboxes without using any js file. Beacuse whenever i use jquery 1.8.3 or jquery 1.7.2. My other js file don't run or may be due to some problem they don't run. So, I have checkboxes in gridview and i want to perform check All option.</p>
  
  <pre><code> &lt;asp:GridView Width="96%" HeaderStyle-HorizontalAlign="left" ID="gridimages" Font-Size="13px" HeaderStyle-Font-Size="15px" runat="server"  OnSorting="gridimages_Sorting" AutoGenerateColumns="false" AllowSorting="true" CssClass="grid gridimages" HeaderStyle-BorderColor="#D0D0D0" AlternatingRowStyle-BorderColor="#D0D0D0" RowStyle-BorderColor="#D0D0D0" OnRowDataBound="gridimages_RowDataBound" AllowPaging="true" PageSize="50" PagerSettings-Mode="NumericFirstLast" OnPageIndexChanging="gridimages_PageIndexChanging" CellPadding="3" BorderColor="#D0D0D0" BorderStyle="Groove" BorderWidth="1px" OnSelectedIndexChanged="gridimages_SelectedIndexChanged" GridLines="both"&gt;
          &lt;AlternatingRowStyle BackColor="White" ForeColor="#284775"/&gt;
       &lt;%--   &lt;RowStyle HorizontalAlign="Center" /&gt;--%&gt;
          &lt;Columns&gt;
  
              &lt;asp:TemplateField HeaderStyle-Width="20px" HeaderStyle-Font-Size="14px" HeaderStyle-ForeColor="Black"&gt;
            &lt;HeaderTemplate&gt;
              &lt;asp:CheckBox ID="chkSelectAll" class="checkAll" runat="server" Text="" onclick="SelectAllCheckboxes(this);"  /&gt;
          &lt;/HeaderTemplate&gt;
                  &lt;ItemTemplate&gt;      &lt;div style="text-align: left;"&gt;
                     &lt;asp:HiddenField ID="hdn_id" runat="server" Value='&lt;%#Eval("Id") %&gt;' /&gt;
  
                      &lt;asp:CheckBox ID="CheckBoxImage" CssClass="CheckBoxImage1"  onClick="CheckBoxImage();" runat="server" /&gt;&lt;/div&gt;
                  &lt;/ItemTemplate&gt;
              &lt;/asp:TemplateField&gt;
  </code></pre>
  
  <p> </p>
  
  <p>javascript code:</p>
  
  <pre><code>           function SelectAllCheckboxes(chk) {
          var gvcheck = document.getElementById('&lt;%= gridimages.ClientID %&gt;');
          var i;
          //Condition to check header checkbox selected or not if that is true checked all checkboxes
          if (chk.checked) {
              for (i = 0; i &lt; gvcheck.rows.length; i++) {
                  var inputs = gvcheck.rows[i].getElementsByTagName('input');
                  inputs[0].checked = true;
              }
          }
              //if condition fails uncheck all checkboxes in gridview
          else {
              for (i = 0; i &lt; gvcheck.rows.length; i++) {
                  var inputs = gvcheck.rows[i].getElementsByTagName('input');
                  inputs[0].checked = false;
              }
          }
      }
  </code></pre>
  
  <p>Look at the javascript code. I am having problem in the var inputs. I want the id of the CheckBoxImage in var inputs but not able to do. What do i have to change in var inputs line to get the id of checkboximae. Please help.</p>