28
rated 0 times
[
34]
[
6]
/ answers: 1 / hits: 51636
/ 13 Years ago, tue, april 19, 2011, 12:00:00
I want to use JavaScript to show my XSLT, but on my server nothing is showing up in the browser.
<!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN>
<html>
<head>
<script type=text/javascript src=http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js></script>
<script type=text/javascript src=main.js></script>
<meta http-equiv=Content-Language content=en-us/>
<title>Contracting, Licensing and Compliance News</title>
</head>
<body>
<script language=javascript>
function displayMessage() {
// Load XML
var xml = new ActiveXObject(Microsoft.XMLDOM)
xml.async = false
xml.load(site-index.xml)
// Load the XSL
var xsl = new ActiveXObject(Microsoft.XMLDOM)
xsl.async = false
xsl.load(site-index.xsl)
// Transform
document.write(xml.transformNode(xsl))
}
</script>
</body>
</html>
More From » xml