The online racing simulator
Java Script and Firefox
(4 posts, started )
#1 - Tooby
Java Script and Firefox
Hi!
Do you know why this work in IE 6 and not Firefox 1.07?
/Tooby

Code example:
----------------------------------------------------------
<html>
<body>
<script type="text/javascript">
// Load XML
var xml = new ActiveXObject("Microsoft.XMLDOM")
xml.async = false
xml.load("<path and name of file>.xml")
// Load XSL
var xsl = new ActiveXObject("Microsoft.XMLDOM")
xsl.async = false
xsl.load("<path and name of file>.xsl")
// Transform
document.write(xml.transformNode(xsl))
</script>
</body>
</html>
-----------------------------------------
#2 - Stuff
Firefox thankfully doesn't support ActiveX as the code says " var xml = new ActiveXObject("Microsoft.XMLDOM")"

Check this out for a cross-browser example: W3Schools XML DOM Parser
Also, for the ultimate Mozilla reference, the mozilla developer center
-
(thisnameistaken) DELETED by thisnameistaken
#3 - Tooby
Ok!
So if you want to solve this with out ActiveX...How do you do?

I have a XML file and a XSL file that order the the output. I would like to have them on the server and "only" see the htm output. Is there a better/other way to solve it?

/Tooby

Edit: Stuff-Thanx for the links.
-
(thisnameistaken) DELETED by thisnameistaken
#4 - Tooby
ahha!
Thanx!
I just found "how" to do it with php. I will have a look at it.

/Tooby

Edit: tried this code and work like charm

<?php
$parser = xslt_create();
$html = xslt_process($parser, "xxx.xml",
"xxx.xsl");
xslt_free($parser);

echo $html;
?>

Java Script and Firefox
(4 posts, started )
FGED GREDG RDFGDR GSFDG