Grazie della risposta!
Avevo inviato il quesito anche ad un amico (Bik) che mi ha dato il codice che soddisfa perfettamente la mia richiesta (con il cambio di "type").
Posto il codice che può tornare utile:
codice:
<script language="Javascript">
function vediPwd() {
var newObject = document.createElement('input');
var oldObject = document.getElementById('thePwd');
if(oldObject.type == "password"){
newObject.type = "text";
document.getElementById('linkPwd').innerHTML = "<a href=\"javascript:void(0);\" onclick=\"vediPwd()\">Nascondi</a>";
}
else{
newObject.type = "password";
document.getElementById('linkPwd').innerHTML = "<a href=\"javascript:void(0);\" onclick=\"vediPwd()\">Mostra</a>";
}
if(oldObject.size) newObject.size = oldObject.size;
if(oldObject.value) newObject.value = oldObject.value;
if(oldObject.name) newObject.name = oldObject.name;
if(oldObject.id) newObject.id = oldObject.id;
if(oldObject.className) newObject.className = oldObject.className;
oldObject.parentNode.replaceChild(newObject,oldObject);
return newObject;
}
</script>
<input name="login" id="thePwd" type="password" size="30" maxlength="250"/>
<div id="linkPwd">Mostra</div>