Ver Mensaje Individual
  #8 (permalink)  
Antiguo 06/11/2004, 11:46
angsanchez
 
Fecha de Ingreso: octubre-2004
Ubicación: España
Mensajes: 894
Antigüedad: 19 años, 6 meses
Puntos: 3
Lo más sencillo será simplemente ignorar los guiones en la validación.
Cambia esto:
Código:
if(!validaTfno(form.telefono.value)){
alert("ERROR: Ingrese su teléfono solo numeros. "); form.telefono.focus(); return;
}
y añade esto:
Código:
function validaTfno(tx) {
	var tx1 = ''
	for (i=0;i<tx.length;i++) {
		if ( tx.charAt(i) != '-' ) { tx1 += tx.charAt(i) }
	}
	return validaNumeros(tx1)
}