Revision: 50650
Updated Code
at September 10, 2011 00:57 by alberomo
Updated Code
function NIFValida(element_form){ element_form.value=element_form.value.toUpperCase(); element_form.value=eliminaEspacios(element_form.value); if(parseNIF(element_form.value) == false ){ errorOutputPre(element_form); } }
Revision: 50649
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at August 30, 2011 01:00 by alberomo
Initial Code
function NIFValida(element_form,msgType,msgLanguage,msgXmlDoc){ element_form.value=element_form.value.toUpperCase(); element_form.value=eliminaEspacios(element_form.value); if(parseNIF(element_form.value) == false ){ todoOk = false; switch(msgType){ case 'alert':alert(loadXmlReports('NIF',msgLanguage,msgXmlDoc)); element_form.onkeypress= function(){ this.style.backgroundColor='#FFFFFF'; } break; case 'id' : document.getElementById('errMsg').innerHTML=loadXmlReports('NIF',msgLanguage,msgXmlDoc); element_form.onkeypress= function(){ this.style.backgroundColor='#FFFFFF'; document.getElementById('errMsg').innerHTML=''; } break; case 'sibling' : element_form.nextSibling.innerHTML=loadXmlReports('NIF',msgLanguage,msgXmlDoc); element_form.onkeypress= function(){ this.style.backgroundColor='#FFFFFF'; this.nextSibling.innerHTML=''; } break; } element_form.style.backgroundColor='#FFFF99'; } }
Initial URL
Initial Description
Descripción: Valida los campos de NIF enviados por la función validaForm-->http://snipplr.com/view/58245/funcin-validaform-para-validar-formularios-con-parmetros-xml-y-nombres-de-clase/. En el caso de que no sea validado, llama a la función errorOutputPre y envia el elemento como parámetro Recibe: El elemento. Llama a: eliminaEspacios-->http://snipplr.com/view/58250/funcin-eliminaespacios/, y parseNIF-->http://snipplr.com/view/58252/funcin-parseemail/
Initial Title
Función NIFValida
Initial Tags
forms
Initial Language
JavaScript