<html>
<head>
<title>Javascript + Xml menu</title>
<script language="JavaScript">
function inhoud()
{
if (document.implementation && document.implementation.createDocument)
{
xmlDoc = document.implementation.createDocument("", "", null);
xmlDoc.onload = create;
}
else if (window.ActiveXObject)
{
xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.onreadystatechange = function ()
{
if (xmlDoc.readyState == 4) create()
};
}
else
{
alert('Your browser can\'t handle this script');
return;
}
xmlDoc.load("data/inhoud.xml");
}
function create()
{
...
}
</script>
</head>
<body onload="inhoud();">
<div id="menu" style="background-color:green"></div>
</body>
</html>
<html>
<head>
<title>Javascript + Xml menu</title>
<script language="JavaScript">
function inhoud()
{
if (document.implementation && document.implementation.createDocument)
{
xmlDoc = document.implementation.createDocument("", "", null);
xmlDoc.onload = create;
}
else if (window.ActiveXObject)
{
xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.onreadystatechange = function ()
{
if (xmlDoc.readyState == 4) create()
};
}
else
{
alert('Your browser can\'t handle this script');
return;
}
xmlDoc.load("data/inhoud.xml");
}
function create()
{
...
}
</script>
</head>
<body onload="inhoud();">
<div id="menu" style="background-color:green"></div>
</body>
</html>