Ver Mensaje Individual
  #4 (permalink)  
Antiguo 10/05/2005, 06:18
Avatar de Il Dody
Il Dody
 
Fecha de Ingreso: abril-2005
Ubicación: Argentina
Mensajes: 88
Antigüedad: 19 años, 9 meses
Puntos: 1
Gracias por la respuesta Monoswim!
Probé con lo q me dijiste pero no me funciona. Supongo q se debe a que no lo estoy colocando como corresponde. Te paso todo el javascript asi ves donde lo coloque, a ver si lo hice bien!
Muchisimas gracias!


<script>
function check(){
document.formul.enviar.value = "Procesando Formulario";
document.formul.enviar.disabled = true;
document.formul.submit();
}
var patron = new Array(2,2,4)
var patron2 = new Array(1,3,3,3,3)
function mascara(d,sep,pat,nums){
if(d.valant != d.value){
val = d.value
largo = val.length
val = val.split(sep)
val2 = ''
for(r=0;r<val.length;r++){
val2 += val[r]
}
if(nums){
for(z=0;z<val2.length;z++){
if(isNaN(val2.charAt(z))){
letra = new RegExp(val2.charAt(z),"g")
val2 = val2.replace(letra,"")
}
}
}
val = ''
val3 = new Array()
for(s=0; s<pat.length; s++){
val3[s] = val2.substring(0,pat[s])
val2 = val2.substr(pat[s])
}
for(q=0;q<val3.length; q++){
if(q ==0){
val = val3[q]
}
else{
if(val3[q] != ""){
val += sep + val3[q]
}
}
}
d.value = val
d.valant = val
}
}
function Validar(form)
{
if (form.Nombre.value == "")
{ alert("Por favor ingrese su nombre"); form.Nombre.focus(); return; }

if (form.Email.value == "")
{ alert("Por favor ingrese su dirección de e-mail"); form.Email.focus(); return; }

if (form.Domicilio.value == "")
{ alert("Por favor ingrese su domicilio"); form.Domicilio.focus(); return; }

if (form.Telefono.value == "")
{ alert("Por favor ingrese su número de teléfono"); form.Telefono.focus(); return; }

if (form.Email.value.indexOf('@', 0) == -1 ||
form.Email.value.indexOf('.', 0) == -1)
{ alert("Dirección de e-mail inválida"); form.Email.focus(); return; }

form.submit();
alert('msg de error');
return false;
}
</script>
__________________
IL DODY