Seriously, what doesn't this workin IE but works in FF? MathML & DOM

D

dan_andrews

<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"
"http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd" [
<!ENTITY mathml "http://www.w3.org/1998/Math/MathML">
]>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Minimum Document with MathML</title>
<script>
var pi=Math.PI
function JUMPING()
{
var xx=document.getElementById("fVolume").value;
document.getElementById("Calculation").style.visibility="";
alert(document.getElementById("AreaPi").innerHTML);

document.getElementById("AreaPi").firstChild.data=Math.round((xx/pi)*100000)/100000;

document.getElementById("SqAreaPi").firstChild.data=Math.round(Math.sqrt(xx/pi)*100000)/100000;

document.getElementById("X").firstChild.data=2*Math.round(Math.sqrt(xx/pi)*100000)/100000;
}
</script>
</head>
<body>
<input type="int" id="fVolume"></input>
<input type="button" onclick="JUMPING()"
value="Calculate"></input>
<p>
<b>
<math xmlns="&mathml;">
<mrow>
<mi>A</mi>
<mo>=</mo>
<mi>&pi;</mi>
<mo>&InvisibleTimes;</mo>
<msup>
<mi>R</mi>
<mn>2</mn>
</msup>
</mrow>
</math>
<br></br>
<math xmlns="&mathml;">
<mrow>
<mi>V</mi>
<mo>=</mo>
<mi>A</mi>
<mo>&InvisibleTimes;</mo>
<mi>H</mi>
</mrow>
</math>
<br></br>
<math xmlns="&mathml;">
<mrow>
<mi>H</mi>
<mo>=</mo>
<mi>1</mi>
</mrow>
</math>
</b>
</p>
<p>
<math xmlns="&mathml;">
<mrow>
<mfrac>
<mrow>
<mi>A</mi>
</mrow>
<mrow>
<mi>&pi;</mi>
</mrow>
</mfrac>
<mo>=</mo>
<msup>
<mi>R</mi>
<mn>2</mn>
</msup>
</mrow>
</math>
<br></br>
<math xmlns="&mathml;">
<msqrt>
<mrow>
<mfrac>
<mrow>
<mi>A</mi>
</mrow>
<mrow>
<mi>&pi;</mi>
</mrow>
</mfrac>
</mrow>
</msqrt>
<mo>=</mo>
<mi>R</mi>
</math>

<div style="visibility:hidden" id="Calculation">
<math xmlns="&mathml;">
<msqrt>
<mrow>
<mi id="AreaPi">Z</mi>
</mrow>
</msqrt>
<mo>=</mo>
<mi>R</mi>
</math>
<br></br>
<math xmlns="&mathml;">
<mrow>
<mi id="SqAreaPi">z</mi>
</mrow>
<mo>=</mo>
<mi>R</mi>
</math>
<br></br>
<math xmlns="&mathml;">
<mrow>
<mi>D</mi>
</mrow>
<mo>=</mo>
<mi>2</mi>
<mo>&InvisibleTimes;</mo>
<mi>R</mi>
</math>
<br></br>
<math xmlns="&mathml;">
<mrow>
<mi>D</mi>
</mrow>
<mo>=</mo>
<mi id="X">X</mi>
</math>
</div>
</p>
</body>
</html>
 
D

dan_andrews

I have the plugin installed - for MathML. The header information is
right from the example on MathML's site...

I wish there was a better way to display dynamic mathematical formulas
on the web. I'd hate to just use PHP and generate a GIF image.

Thanks for your post, I'm still in search of a solution.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top