title: How to handle innerHTML using javascript
body: <p>I need to create a table within the page when the submit button is clicked.. so i use onclick() to call the function javascript.. its working fine for one submit button.. if i had more than one submit button its not working fine..</p>
  
  <p>here is the coding javascript coding.</p>
  
  <pre><code>function openemailbox(formtitle, fadin)
  {
      var box1 = document.getElementById('box');
  
      document.getElementById('filter1').style.display='block';
  
      var btitle1 = document.getElementById('boxtitle');
      btitle1.innerHTML = formtitle;
  
      if(fadin) {
          gradient1("box1", 0);
          fadein1("box1");
      }
      else {
          box1.style.display='block';
      }
  }
  </code></pre>
  
  <p>the jsp coding is</p>
  
  <pre><code>&lt;div id="filter1"&gt;&lt;/div&gt;
  &lt;div id="box1"&gt;
    &lt;span id="boxtitle"&gt;&lt;/span&gt;
    ...
  &lt;/div&gt;
  </code></pre>
  
  <p>if i give two javascript it is working fine for 1 and not for another..instead it displaying without going into the onclick()</p>