Ciao a Tutti,
ho la mia pagina asp in cui:
<head>
var nationdb = new Object()
nationdb["africa"] = [{value:"congo", text:"Congo"},{value:"nigeria", text:"Nigeria"}];
nationdb["europa"] = [{value:"francia", text:"Francia"},{value:"italia", text:"Italia"}];
//
function setNation(chooser) {
var newElem;
var where = (navigator.appName == "Microsoft Internet Explorer") ? -1 : null;
var natChooser = chooser.form.elements["nazione"];
while (natChooser.options.length) {
natChooser.remove(0);
}
var choice = chooser.options[chooser.selectedIndex].value;
var db = nationdb[choice];
newElem = document.createElement("option");
newElem.text = "Select Nation:";
newElem.value = "";
natChooser.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;
natChooser.add(newElem, where);
}
}
}
</head>
<body>
<select name="continente" onchange="setNation(this)"
<option value="" selected="selected">Select Continent: </option>
<option value="africa">Africa</option>
<option value="europa">Europa</option>
</select>
<select name="nazione" onchange="setCity(this)">
<option value="" selected="selected">Select Nation: </option>
</select>
Tutto e' OK !!
La mia domanda e': e' possibile migliorare l' aspetto estetico dell' array ??
Nel pratico:
Vorrei che Congo e Nigeria venissero scritte in rosso, mentre le nazioni europee fossero in bold e in colore blu ....
E' possibile cio' ???
Grazie mille in anticipo !!!

Rispondi quotando
!!!!