(Java)Script in combination with MathML not executed by Firefox 3.0.11
Daniël Koppenol <[email protected]> Mon, 29 Jun 2009 10:13:25 -0700 (PDT)
| Newsgroups | gmane.comp.mozilla.devel.mathml |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <e8041022-c184-443d-b034-e99c93d67ef4@g19g2000yql.googlegroups.com> |
Hello all,
I just started as a web developer and I'm particularly interested in
publishing some of my math related content on the web, so therefore I
'use' MathML in combination with XHTML. So far the rendering of
formulas is working in both FF and IE, but now when I want to execute
a JavaScript as part of a web page that contains formulas in FF, it
doesn't work while it does work in IE8 (albeit not entirely correct).
I don't see why. Can someone help me out here? I allow execution of
JavaScript in the browser so that'snot the problem at least... I think
it has something to do with my code, but I'm not sure... Here it is:
(Example Code):
<?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">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head> <title>XTHML with MATHML</title> </head>
<body>
<p>
<math xmlns='http://www.w3.org/1998/Math/MathML'>
<mrow>
<munderover>
<mo>∑</mo>
<mrow>
<mi>t</mi>
<mo>=</mo>
<mn>0</mn>
</mrow>
<mn>10</mn>
</munderover>
<mrow>
<mfenced open = '(' close = ')'>
<mfrac bevelled='true'>
<mrow>
<mo stretchy='false'>(</mo>
<mn>4</mn>
<mo>×</mo>
<mi>t</mi>
<mo stretchy='false'>)</mo>
</mrow>
<msup>
<mi>t</mi>
<mn>2</mn>
</msup>
</mfrac>
</mfenced>
</mrow>
</mrow>
</math>
</p>
<p>
<script type="text/javascript">
now = new Date();
localtime = now.toString();
utctime = now.toGMTString();
document.write("<b>Local time:</b> " + localtime + "<br/>");
document.write("<b>UTC time:</b> " + utctime + "<br/>");
hours = now.getHours();
mins = now.getMinutes();
secs = now.getSeconds();
document.write("<h1>" + hours + ":" + mins + ":" + secs + "</h1>");
</script>
</p>
</body>
</html>
Thanks in advance for any comments,
greetz Daniël.