I have 2 input boxes and want to display the result of adding them. If I run the code below it will add the inputs as strings (example: input 1=1 input2=2. result 12 , instead of 3)
I saw a few solutions but none work because I don’t know what to add in the console to display a number calculated. At the moment I only have a text and that won’t give me a numeric result.
Thank you!
$w . onReady ( function () {
$w ( ‘#message’ ). text = ‘Hello World’ ;
$w ( ‘#button’ ). label = ‘Click Me’ ;
$w ( ‘#weight’ ). value ;
$w ( ‘#height’ ). value ;
$w ( '#button' ). onClick (() => {
$w ( '#message' ). text = $w ( '#weight' ). value + $w ( '#height' ). value ;
});
});