Barcode scanner: authenticate local storage value.
Hi! i have a barcode scanner on my app.. and i have a code to authenticate whats in a label. Its working like this: scanning a code - the info from the scan result goes in the local storage "_qr" - redirects to the result page - on load the result page displays the local storage in a label - on load 2, the javascript authenticate is running to check if "buss" is in the label. If not it displays an alert-box and redirects to home.
The problem here is that i want the authenticate code to run right after the barcode is scanned. "barcode scan complete" - then it redirects if it is right and displays an alert if wrong.
The thing is that as from where i'm standing, i cant read local storage without outputting the storage as label.
So, how can i check if the local storage contains a unique text?