Page 1 of 1

two images TWO values ..one field in the database...oh that code is elusive .....

Posted: Tue May 17, 2016 9:02 pm
by neuronhighway9522

I have two images on the page. I want the user to click on one of them . As they click one one I want the the service to record their choice . Create service working fine except that I want to and return A numerical value of 10 for a field in the database collection should they select that image. If they choose the other image it also invoke sthe service returns a different numerical of 20 for that same field in the collection.

so
this is not working.....
if
appery.io('mobileimage_sadface') clickevent {return ("25") } ;
else
appery.io('mobileimage_happyface')clickevent
{return ("85"};

also I am using a virtual click event so not sure how that impacts this as well.

Can you help a newbie out? Trying to get my app finished!


two images TWO values ..one field in the database...oh that code is elusive .....

Posted: Wed May 18, 2016 2:07 pm
by Serhii Kulibaba

Hello,

JS code provided by you is totally wrong.

Please set a storage variable value on the click event of these images: https://devcenter.appery.io/documenta... and use this variable in the request parameter of the create service: https://devcenter.appery.io/documenta...