ya encontre uno re bueno :D
Código:
function upperCase(e) {
tecla = (document.all) ? e.keyCode : e.which;
if(tecla == 9 || tecla == 0) return true;
if(tecla == 8) return true;
if(window.Event){
var pst = e.currentTarget.selectionStart;
var string_start = e.currentTarget.value.substring(0,pst);
var string_end = e.currentTarget.value.substring(pst ,e.currentTarget.value.length);
e.currentTarget.value = string_start+ String.fromCharCode(tecla).toUpperCase()+ string_end;
e.currentTarget.selectionStart = pst + 1;
e.currentTarget.selectionEnd = pst + 1;
e.stopPropagation();
return false;
}
else {
te = String.fromCharCode(tecla);
te = te.toUpperCase();
num = te.charCodeAt(0);
e.keyCode = num;
}
}
Cita: <td><input name="${status.expression}" type="text" id="Nombre" class="big" value="$!status.value" onkeypress="return upperCase(event)" alt="blank" maxlength="50">#foreach($error in $status.errorMessages) <b><label color="red">$error</label></b> <br> #end</td>
ahora el problema que tengo es que antes tenia un onkeypress="return SoloLetras(event)" se puede utilizar 2 funciones?
o que podria usar para escribir solo letras y no numeros y que queden en mayusculas??
gracias :D
otra vez