Justice Chan
Posts: 0
Joined: Mon Apr 21, 2014 11:47 am

problem of javascript--fill in color

I want to fill the color by scanning the qr code. When I scan (red) qrcode, the photo background will be fill in red. Green qr code is also. However, I do not know why I scan red qr code, it still fills in green.The text is checking what I have scan. Image Image Image Image

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

problem of javascript--fill in color

Hi,

Sorry, not sure what you mean by photo background and how you are about to change it. If you haven't implemented it yet - this may be helpful: http://stackoverflow.com/questions/20...

You can set any property using Appery function: preAppery('componentname').css('color', 'blue');/preSame as above, just without using Appery function (straight jQuery): pre$('div[dsid="componentname"]').css('color', 'blue');/preorpre$("[dsid=componentname]").css('color', 'blue');/pre
Where componentname is a name of the component.

Justice Chan
Posts: 0
Joined: Mon Apr 21, 2014 11:47 am

problem of javascript--fill in color

ok how about if i want to check the number of scan? For example, Scan first time fill the top of the image. seconnd time fill the down image. Thank You so much!!

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

problem of javascript--fill in color

You could create a localStorage counter variable and increment its value on service Success event, for example. Please note, it's stored as string - you will need to parse it. Not too elegant, but should work.

Justice Chan
Posts: 0
Joined: Mon Apr 21, 2014 11:47 am

problem of javascript--fill in color

I try this but it doesn't work. Anyway.Thank for the reply^^ Image

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

problem of javascript--fill in color

Where do you run this code? What is checkcolor() and checkcolor1()?
What do you see in browser console (F12) ?

Justice Chan
Posts: 0
Joined: Mon Apr 21, 2014 11:47 am

problem of javascript--fill in color

checkcolor() and checkcolor1() are the function in javascript. Since it is the barcode scannar, i cannot test in the browser.

When the user scan one time, the color will be filled in the top of image. Second time, the color will be filled in the down of image.

Image Image Image Image

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

problem of javascript--fill in color

Please try the suggested code to access components.
https://getsatisfaction.com/apperyio/...

Return to “Issues”