/** * * @param e tecla pulsada en el input text * @return patron.test(te) acepta o no el caracter de la tecla pulsada * * Creacion 05 de Abril de 2011 * @author: Guillermo Torres Garzon. */ /** * Modificación 11 de Abril del 2014 * @author Veronica Martín * - Agregar a la funcion numerico que tambien acepte el tabulador ( || tecla==0 ) * */ function alfanumerico(e) { tecla = (document.all)?e.keyCode:e.which; if (tecla==8) return true; patron = /^[a-zA-Z0-9]*$/; te = String.fromCharCode(tecla); return patron.test(te); } function numerico(e) { tecla = (document.all)?e.keyCode:e.which; if (tecla==8 || tecla==0 ) return true; patron = /^[0-9]*$/; te = String.fromCharCode(tecla); return patron.test(te); } function onchange_select_forma_entero(e_VALUE) { switch(e_VALUE) { case '': case 'RECOMENDACION': document.getElementById('FORMA_ENTERO_ESPECIFICACION').style.visibility="hidden"; document.getElementById('FORMA_ENTERO_ESPECIFICACION_TEXTFIELD').value=""; break; case 'BUSCADOR': case 'PORTAL': case 'OTRO': document.getElementById('FORMA_ENTERO_ESPECIFICACION').style.visibility="visible"; break; } } function onchange_select_pais(e_PAIS) { switch(e_PAIS) { case '1': document.getElementById('CAMPOS_MEXICO').style.display=""; document.getElementById('CAMPOS_OTRO').style.display="none"; break; default: document.getElementById('CAMPOS_MEXICO').style.display="none"; document.getElementById('CAMPOS_OTRO').style.display=""; break; } }