Quote from
Guust on December 9, 2021, 4:16 pm
Good afternoon,
I have a (very) simple webapp module that allows users to indicate each time they take a coffee.
When they reach a certain amount, they are offered to pay.
The variable of the number of coffees is stored with |SetItem "nCoffees" [nCoffees]| on Local storage.
With every click on the button the command |[nCoffees]+1| is executed and that works perfectly.
When the app is closed and reopened, the variable [nCoffees] is displayed correctly (retrieved with |GetItem "nCoffees" [nCoffees]| from Local Storage).
Now when the button is pressed and the command |[nCoffees]+1| is executed, the variable [nCoffees]1 indicates, the second time [nCoffees]11, [nCoffees]111, [nCoffees ]1111 … and further on.
So the sum is no longer made, but a number 1 is added with every click.
Does anyone have an idea where the error is?
grtz,
Good afternoon,
I have a (very) simple webapp module that allows users to indicate each time they take a coffee.
When they reach a certain amount, they are offered to pay.
The variable of the number of coffees is stored with |SetItem "nCoffees" [nCoffees]| on Local storage.
With every click on the button the command |[nCoffees]+1| is executed and that works perfectly.
When the app is closed and reopened, the variable [nCoffees] is displayed correctly (retrieved with |GetItem "nCoffees" [nCoffees]| from Local Storage).
Now when the button is pressed and the command |[nCoffees]+1| is executed, the variable [nCoffees]1 indicates, the second time [nCoffees]11, [nCoffees]111, [nCoffees ]1111 … and further on.
So the sum is no longer made, but a number 1 is added with every click.
Does anyone have an idea where the error is?
grtz,