title: Call javascript function from .innerHTML href
body: <p>I am altering a P element on a page by calling it's id with a javascript function and I am trying to call another javascript function called closeWindow from the HREF of a .innerHTML like below.</p>
  
  <pre><code>document.getElementById("link").innerHTML = "&lt;p&gt;You may close this window &lt;a href="javascript:closeWindow();"&gt;here&lt;/a&gt;&lt;/p&gt;"
  </code></pre>
  
  <p>However the javascript:closeWindow is not getting called or I should say is not even being read at all and the function fails.</p>
  
  <p>Any suggestions would be appreciated</p>