and without that line code (looks like this):
var g=localStorage.getItem('id');
I get an error as well:
so in either case, theres an error. I have no idea what that error is.... please help..??
heres the error if you have trouble viewing the pic:
TypeError: element is undefined
[Break On This Error]
locked: function() {
Image 2, original post, you are setting this:
code
localStorage.setItem('id', g)
/code
but there is no 'g' variable in the function.
The function gets passed 'value' (the actual value from from the service) and 'element' (UI component).
You should use 'value'. But you don't need to do that at all, just by mapping, the value will be set.
It's described in the docs: http://docs.appery.io/documentation/a...
ok well if i delete the JS for that one, and leave the JS on the one sending back to the server - i still get an error because when im submitting that page the server, its missing the value necessary to complete the submit_load service. The server returns back a false. I need a true response from the server
ok, well as i can tell after reading the documentation, i think my JS code is probably wrong. I deleted the the 1st JS since your saying by default by mapping it will be stored. Now, to return a value back to the server, my revised code looks like this:
localStorage.setItem('id, 'driver_name');
return id.toUpperString();
Please tell me whats wrong with this code?
i guess its supposed to be a getItem... i changed it, but still nothing has changed. And to be honest, I found the line code: return value.toUpperString();
in your documentation, but im not even sure what ...toUpperString(); means. I rewrote it like this and i still dont get it to work:
localStorage.getItem('id', 'driver_name');
return id;
so, can i get some help on this code?
toUpperString() is a JavaScript function that converts string to all upper case. It's used as an example, you don't need to use it.
There is no method localStorage.getItem('id', 'driver_name'). It should be setItem. To get an item, you should use:
localStorage.setItem(key, value)
Local storage (and toUpperCase) is standard JavaScript browser API. I highly recommend you review it here: https://developer.mozilla.org/en-US/d...
Hi John - is there any errors in console with this changes?