Provato con un semplice prompt?
codice:
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Pagina senza titolo</title>
<script type="text/javascript">
function makeCustomizable () {
var oChoice = document.tuoForm.scelta, oCustom = document.createElement("option");
makeCustomizable.idx = oChoice.selectedIndex;
oCustom.id = makeCustomizable.customId;
oCustom.value = makeCustomizable.customNull;
oCustom.innerHTML = makeCustomizable.customNullLbl;
oCustom.style.fontStyle = "italic";
oChoice.onchange = makeCustomizable.checkForCustom;
oChoice.appendChild(oCustom);
}
makeCustomizable.checkForCustom = function () {
var oSelected = this.options[this.selectedIndex];
if (oSelected.id === makeCustomizable.customId) {
var bIsDefault = oSelected.value === makeCustomizable.customNull, sNewVal = prompt("Inserisci un valore", bIsDefault ? "" : oSelected.value);
if (sNewVal) {
oSelected.innerHTML = oSelected.value = sNewVal;
oSelected.style.fontStyle = "normal";
} else if (bIsDefault) {
this.selectedIndex = makeCustomizable.idx;
return;
}
}
makeCustomizable.idx = this.selectedIndex;
};
makeCustomizable.customNull = "null";
makeCustomizable.customNullLbl = "Personalizza";
makeCustomizable.customId = "customize-opt";
onload = makeCustomizable;
</script>
</head>
<body>
<form name="tuoForm">
Scegli:
<select name="scelta">
<option value="scelta1">Scelta n. 1</option>
<option value="scelta2">Scelta n. 2</option>
<option value="scelta3">Scelta n. 3</option>
</select>
</p>
</form>
</body>
</html>