i did something like this and this works perfectly but now i really dont
know how i can validate a email in the client side and server side
<script>
function soloLetras(e) {
key = e.keyCode || e.which;
tecla = String.fromCharCode(key).toLowerCase();
letras = " áéíóúabcdefghijklmnñopqrstuvwxyz";
especiales = [8, 37, 39, 46];
tecla_especial = false
for(var i in especiales) {
if(key == especiales[i]) {
tecla_especial = true;
break;
}
}
if(letras.indexOf(tecla) == -1 && !tecla_especial)
return false;
}
function limpia() {
var val = document.getElementById("miInput").value;
var tam = val.length;
for(i = 0; i < tam; i++) {
if(!isNaN(val[i]))
document.getElementById("miInput").value = '';
}
}
</script>
<input type="text" onkeypress="return soloLetras(event)" onblur="limpia()"
id="miInput">
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.