Buonasera a tutti,
avrei bisogno di un aiuto con un menù dinamico.Il problema è che il menù a tendina dovrebbe contenere i link con i vari documenti html relativi alle pagine del sito ma pur avendo inserito i link alle pagine con xlink, non succede nulla quando clicco sulle varie opzioni del menù.
Vi ringrazio in anticipo, di seguito vi lascio i tre documenti html,javascript e xml.
HTML:
<!DOCTYPE html>
<head>
<title>Biricotti piante e fiori</title>
<meta charset="UTF-8" />
<meta name="author" content="Jennifer" />
<script type="text/javascript"
src="Biricotti.js"></script>
</head>
<body>
<form>
<select id="menu">
</select>
</form>
</body>
</html>


JAVASCRIPT:

function caricaXML(nomeFile) {
var xmlhttp;
if (window.XMLHttpRequest) {
// IE7+, Firefox, Chrome, Opera, Safari
xmlhttp = new XMLHttpRequest();
} else {
// IE6, IE5
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("GET", nomeFile , false);
xmlhttp.send();
return xmlhttp.responseXML;
}

function creaSelect () {
opzioni = {};
var lista = radice.getElementsByTagName("select");//fa una lista di elementi p
for (var i = 0; i < lista.length; i++) { //scandisce tutti gli elementi della lista
var opzione = lista[i].firstChild.nodeValue;
opzioni[opzione] = opzione;
}
}



function opzioniSelect () {
var s = "";
for (var opzione in opzioni) {
s += "<option>" + opzione + "</option>"
}
return s;
}

function gestoreSelect () {
try {
var nodoP = document.getElementById("menu");
var menu = nodoP.value;
} catch ( e ) {
alert("gestoreParola " + e);
}
}
var opzioni;
var radice;


function inizializza () {
try {
radice = caricaXML("Biricotti.xml");
creaSelect();
var nodoP = document.getElementById("menu");
nodoP.onchange = gestoreSelect;
nodoP.innerHTML = opzioniSelect();//inserisce in HTML il menu
gestoreSelect();
} catch ( e ) {
alert("inizializza " + e);
}
}
window.onload = inizializza;

XML:
<?xml version="1.0" encoding="UTF-8"?>
<menu xmlns:xlink="http://www.w3.org/1999/xlink">

<select xlink:type="simple"
xlink:href="Biricotti.html">
MENU
</select>
<select xlink:type="simple"
xlink:href="Biricotti1.html">
IL NEGOZIO
</select>
</menu>