T
toby989
Hi
I am very new to javascript and html. My question is how can I move the script
from the body section to the head section without affecting how the result of
the htm looks?
In the example below, I guess the document.write() dumps its results at the
location where it is.
Thanks for your hints.
Toby
<html>
<body>
<script type="text/javascript">
// Load XML
var xml = new ActiveXObject("Microsoft.XMLDOM")
xml.async = false
xml.load("cdcatalog.xml")
// Load XSL
var xsl = new ActiveXObject("Microsoft.XMLDOM")
xsl.async = false
xsl.load("cdcatalog.xsl")
// Transform
document.write(xml.transformNode(xsl))
</script>
</body>
</html>
I am very new to javascript and html. My question is how can I move the script
from the body section to the head section without affecting how the result of
the htm looks?
In the example below, I guess the document.write() dumps its results at the
location where it is.
Thanks for your hints.
Toby
<html>
<body>
<script type="text/javascript">
// Load XML
var xml = new ActiveXObject("Microsoft.XMLDOM")
xml.async = false
xml.load("cdcatalog.xml")
// Load XSL
var xsl = new ActiveXObject("Microsoft.XMLDOM")
xsl.async = false
xsl.load("cdcatalog.xsl")
// Transform
document.write(xml.transformNode(xsl))
</script>
</body>
</html>