title: Onclick - Multiple JavaScript Queries
body: <p>I've read and tried numerous suggestions from Stack Overflow but none worked for me, forcing me to ask in person.</p>
  <p>Currently I use this code to show and hide some content, the id <code>tb1</code> is the <code>div</code> tag my content is wrapped in.</p>
  <pre><code>&lt;input type=&quot;button&quot; value=&quot;Information&quot; onclick=&quot;javascript:sizeTbl('block');&quot; /&gt;
  &lt;a href=&quot;javascript:sizeTbl('none');&quot;&gt;(&lt;i&gt;Close&lt;/i&gt;)&lt;/a&gt;
  </code></pre>
  <p>The button is &quot;Information&quot; and I've added a clickable link that closes the content, because I can't get the button to register the <code>javascript:sizeTbl('none');&quot;&gt;(&lt;i&gt;Close&lt;/i&gt;)</code></p>
  <p>Can someone please tell me how to do this, I've tried simply adding the <code>javascript:sizeTbl('none');&quot;&gt;(&lt;i&gt;Close&lt;/i&gt;)</code> after the first <code>onclick</code> command like so:</p>
  <pre><code>onclick=&quot;javascript:sizeTbl('block');javascript:sizeTbl('none');&quot;
  </code></pre>
  <p>but it doesn't work and I've also tried the below linked fixes but to no avail.</p>
  <p><a href="https://stackoverflow.com/questions/3910736/onclick-multiple-javascript-functions">How to call multiple JavaScript functions in onclick event?</a></p>
  <p><a href="https://stackoverflow.com/questions/10544520/two-onclick-actions-one-button">Two onClick actions one button</a></p>
  <p>In case it's needed here is the main JS that defines <code>tb1</code> etc.. I've also tried adding a new function directly in to that script (as I thought calling <code>tb1</code> outside might cause an issue)</p>
  <pre><code>function sizeTbl(h) {
    var tbl = document.getElementById('tbl');
    tbl.style.display = h;
  }
  function sizeTb2(h) {
    var tb2 = document.getElementById('tb2');
    tb2.style.display = h;
  }
  function sizeTb3(h) {
    var tb3 = document.getElementById('tb3');
    tb3.style.display = h;
  }
  function sizeTb4(h) {
    var tb4 = document.getElementById('tb4');
    tb4.style.display = h;
  }
  $('#toggle-view').on('click', function() 
  {
     var button = $(this);
  
     if ( button.hasClass('view-page')  ) 
     {
         ViewPage();
         button.removeClass('view-page');   
     } 
     else 
     {
          ViewMenu();
          button.addClass('view-page');
     }
  });
  </code></pre>