Hello All
I have a form to fill up using c#.net.
I can fill up all fields with success, but the form has 2 fields about phone number stays null after I set the value to field.
I found a function in innerxlm property used to mask these fields (Code below).
I used a code like kv.value = "1234567890" to set the value, but just after execute this line, the value is null.
How I can fill up this fields ?
Thanks, marcelo.
Following the function used to mask.
function mascaraTELDDD(){
//formato da máscara não permite digitação de letras
var re = /^\d*$/; //expressao regular (dentro de //), "^\d" (inicia em digito), "*"
var re0 = /^\d{1}$/;//expressão regular para entrar somente digito com 6 caracteres
var re1 = /^\(\d{3}$/;
var re2 = /^\(\d{2}\)\s\d{5}$/;
var ec; //event change
ec = xfa.event.change;// a marcara é aplicada enquanto é digitado
if (re.test(ec) == false){//se o valor (".test") for algum valor diferente de da variavel "re" ou seja diferente de dígito ele faz abaixo
app.beep();//caso ocorra erro
xfa.event.change = "";
}
else{
if(re0.test(xfa.event.newText) == true){
xfa.event.change = "(" + ec;
}
if(re1.test(xfa.event.newText) == true){
xfa.event.change = ") " + ec;//aplicação da máscara
}
if(re2.test(xfa.event.newText) == true){
xfa.event.change = "-" + ec;//aplicação da máscara
}
else if(xfa.event.newText.length > 14){
app.beep();//caso ocorra erro
xfa.event.change = "";
}
}