neuronhighway9522
Posts: 0
Joined: Sun Oct 19, 2014 2:42 am

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

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!

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

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

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...

Return to “Issues”