title: setAttribute also also setting the value for the following element
body: <p>I'm pretty sure this one is silly but I can't seem to figure it out myself.</p>
  <p>This is a Django website containing a little bit of Javascript.</p>
  <p>In my HTML, I have a button that should send a few values to a Javascript function. The javascript function should then find and update some divs in the HTML.</p>
  <p>The strange thing is that the value assigned to the setAttribute statement is automatically also used for the following innerHTML statement (overruling whatever was configured there).</p>
  <p>HTML Button:</p>
  <pre><code>                &lt;button class=&quot;btn btn-outline-dark&quot; onclick=&quot;monthStats(
                  {{simple_total_monthly_sent_volume}},
                  {{average_monthly_delivery_rate}},
                  {{average_monthly_unique_open_rate}},
                  {{total_monthly_unique_open_volume}},
                  {{average_monthly_unique_click_rate}},
                  {{average_monthly_rejection_rate}},
                  )&quot;&gt;Month&lt;/button&gt;
  </code></pre>
  <p>Javascript:</p>
  <pre><code>function monthStats (sentvolume,
                      deliveryrate,
                      uniqueopenrate,
                      uniqueopenvolume,
                      uniqueclickrate,
                      rejectionrate
                      ) {
      document.getElementById(&quot;sent&quot;).innerHTML = (sentvolume).toLocaleString(&quot;en-US&quot;);
      document.getElementById(&quot;delivered&quot;).innerHTML = deliveryrate+&quot;%&quot;;
      document.getElementById(&quot;uniqueopened&quot;).innerHTML = uniqueopenrate+&quot;%&quot;;
      document.getElementById(&quot;uniqueopened&quot;).setAttribute(&quot;title&quot;, uniqueopenvolume.toString());
      document.getElementById(&quot;uniqueclicked&quot;).innerHTML = uniqueclickrate+&quot;%&quot;;
      document.getElementById(&quot;rejected&quot;).innerHTML = rejectionrate+&quot;%&quot;;
  }
  </code></pre>
  <p>HTML divs that should get updated:</p>
  <pre><code>&lt;div class=&quot;container&quot;&gt;
      &lt;div class=&quot;row&quot;&gt;
          &lt;div class=&quot;col&quot;&gt;
              &lt;div id=&quot;sent&quot; class=&quot;keymetric&quot;&gt;{{simple_total_monthly_sent_volume|intcomma}}&lt;/div&gt;&lt;div class=&quot;text-muted keymetricexplanation&quot;&gt;sent volume&lt;/div&gt;
          &lt;/div&gt;
          &lt;div class=&quot;col&quot;&gt;
              &lt;div id=&quot;delivered&quot; class=&quot;keymetric&quot;&gt;{{average_monthly_delivery_rate}}%&lt;/div&gt;&lt;div class=&quot;text-muted keymetricexplanation&quot;&gt;delivery rate&lt;/div&gt;
          &lt;/div&gt;
          &lt;div class=&quot;col&quot;&gt;
              &lt;div id=&quot;uniqueopened&quot; class=&quot;keymetric&quot; data-bs-toggle=&quot;tooltip&quot; data-bs-placement=&quot;top&quot; title=&quot;{{total_monthly_unique_open_volume|intcomma}}&quot;&gt;{{average_monthly_unique_open_rate}}%&lt;/div&gt;&lt;div class=&quot;text-muted keymetricexplanation&quot;&gt;unique open rate&lt;/div&gt;
          &lt;/div&gt;
          &lt;div class=&quot;col&quot;&gt;
              &lt;div id=&quot;uniqueclicked&quot; class=&quot;keymetric&quot;&gt;{{average_monthly_unique_click_rate}}%&lt;/div&gt;&lt;div class=&quot;text-muted keymetricexplanation&quot;&gt;unique click rate&lt;/div&gt;
          &lt;/div&gt;
          &lt;div class=&quot;col&quot;&gt;
              &lt;div id=&quot;rejected&quot; class=&quot;keymetric&quot;&gt;{{average_monthly_rejection_rate}}%&lt;/div&gt;&lt;div class=&quot;text-muted keymetricexplanation&quot;&gt;rejection rate&lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p>Clicking on the Month button in the HTML results in the title and textvalue of the div with ID &quot;uniqueopened&quot; to be updated correctly by the Javascript. However, the setAttribute statement in the javascript is seemingly also updating the value of the following div with ID &quot;uniqueclicked&quot;, overruling the Javascript statement targeting that div.</p>