I use this command
<div id="formulaOut"><script type="math/tex">z = \sqrt{x^2+y^2}</script></div>
to show a line in Tex format. Now I want to change the content of the line (JavaScript), but I still want to interpret it in the Tex format. When I put a button, I execute the following function:
function Calculation() {
document.getElementById("formulaOut").innerHTML= 'x^2+y^2';
}
But like this, the String is not anymore interpreted as Tex. Any suggestion how I can solve this problem?