Page 1 of 1
which event has to call?
Posted: Tue Mar 18, 2014 11:41 am
by navya kodali
i have some number of input fields.
when i am adding 1+2 result is placed on 3 filed by calling keyup event of 2
4+5 result is placed on 6 filed by calling keyup event of 5
i want total of 3+6 in 7 input filed.for that which event has to call?
value change is not working?
when put cursor on 7 only it works.
but i want when 3,7 input value changed then i want result in total filed how to do this?
which event has to call?
Posted: Tue Mar 18, 2014 12:59 pm
by Nikita
Hello,
You can add such a function:
function fillInput7(){
var input3= Appery("input3").val();
var input6= Appery("input6").val();
if ((input3 !="") &&(input6 !="")){
Appery("input7").val(input3+input6);
}
}
and invoke this function on an event, when you recalculate input3 and input6.
which event has to call?
Posted: Tue Mar 18, 2014 1:09 pm
by navya kodali
on which event i have to call is my question. i did coding part.
how to call that function in which event?
which event has to call?
Posted: Tue Mar 18, 2014 2:01 pm
by Nikita
You should do it on keyup 2 and 5, when you recalculate values.
which event has to call?
Posted: Wed Mar 19, 2014 4:26 am
by navya kodali
can't we do on value change event in 6 and 7?
how to call fillInput7 function?
"fillInput7();"
is this correct syntax to call function or any other way?
which event has to call?
Posted: Wed Mar 19, 2014 6:14 am
by Nikita
Hi Navya.
change event triggers when user exit from the input.
keyup event triggers when user pressed key in the field(it more preferable).
Yes. Following code is correct to call the function "fillInput7".
fillInput7();
Regards.
which event has to call?
Posted: Wed Mar 19, 2014 7:06 am
by navya kodali
i wrote this code in screen1 load event.
function display(){
alert("loaded");
}
call this function in input value change event select action runjs and call as "display();"
for checking this wrote an alert.that alert was displayed.but function is not called.
alert("loaded"); message not displayed.
why is there anything wrong?
which event has to call?
Posted: Thu Mar 20, 2014 7:25 pm
by Maryna Brodina
Hello!
Please check are there any errors in console?