mi sta succedendo una cosa assurda e non capisco il perchè
tra due select mi compare questo carattere Â
ma la cosa più assurda e che in una pagina non esce, copio tale e quale in un altra e mi compare la Â......cioè non ha senso e non riesco a capire da cosa puo' dipendere
ecco qua il codice ,taglio le cose inutili
Codice PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="it">
<head>
<title>Select dinamiche - Esempio JavaScript scaricato da HTML.it</title>
<script type="text/javascript">
var regiondb = new Object()
regiondb["prova"] = [
{value:"1", text:"ciao"},
{value:"2", text:"miao"},
{value:"3", text:"bao"},
{value:"4", text:"tao"},
{value:"5", text:"fao"}];
function setCities(chooser) {
var newElem;
var where = (navigator.appName == "Microsoft Internet Explorer") ? -1 : null;
var cityChooser = chooser.form.elements["sottocategoria"];
while (cityChooser.options.length) {
cityChooser.remove(0);
}
var choice = chooser.options[chooser.selectedIndex].value;
var db = regiondb[choice];
newElem = document.createElement("option");
newElem.text = "Seleziona una sottocategoria:";
newElem.value = "";
cityChooser.add(newElem, where);
if (choice != "") {
for (var i = 0; i < db.length; i++) {
newElem = document.createElement("option");
newElem.text = db[i].text;
newElem.value = db[i].value;
cityChooser.add(newElem, where);
}
}
}
</script>
</head>
<body >
<form name="form" action="<? $_SERVER['PHP_SELF']; ?>">
<select name="categoria" onchange="setCities(this)">
<option value="" selected="selected">Seleziona una categoria:</option>
<option value="prova">prova</option>
</select>_
<select name="sottocategoria">
<option value="" selected="selected">Seleziona una sottocategoria:</option>
</select>
<input type="submit" value="invia" />
</form>
</body>
</html>
a funzionare funziona....però vorrei togliere quel fastidiosissimo carattere