Page 2 of 3

Do I Need any JS Code to store any values to Local STorage if Im already mapping?

Posted: Tue Jun 11, 2013 1:03 am
by John Herdean

this is what happens when theres a bad id value:

Image


Do I Need any JS Code to store any values to Local STorage if Im already mapping?

Posted: Tue Jun 11, 2013 1:19 am
by Illya Stepanov

Ok, thanks for detailed information. Check if result actually stored in localStorage and its has an appropriate format to be sended.


Do I Need any JS Code to store any values to Local STorage if Im already mapping?

Posted: Tue Jun 11, 2013 1:26 am
by John Herdean

how do i check if its stored and what the value is?


Do I Need any JS Code to store any values to Local STorage if Im already mapping?

Posted: Tue Jun 11, 2013 3:30 am
by Illya Stepanov

As for example: make a button and put the following JS code on it:
Image
where 'test' - is your localStorage variable.


Do I Need any JS Code to store any values to Local STorage if Im already mapping?

Posted: Tue Jun 11, 2013 1:35 pm
by John Herdean

ok i did what you said and the result is empty just as i suspected. Somehow Its not storing the value it receives. And I know the service response works because I get a Success confirmation. When I get a success confirmation that means the server responded with some kind of value. See below for Success confirmation:

Image

Image

AND THE RESULT IN THE LOCAL STORAGE ITEM IS NOTHING AS YOU CAN SEE BELOW:

Image

Image


Do I Need any JS Code to store any values to Local STorage if Im already mapping?

Posted: Tue Jun 11, 2013 1:41 pm
by Kateryna Grynko

Hi John,

We'll take a look.


Do I Need any JS Code to store any values to Local STorage if Im already mapping?

Posted: Tue Jun 11, 2013 1:45 pm
by John Herdean

Please do let me know what is the problem here. Because I dont know what else to do. Thanks


Do I Need any JS Code to store any values to Local STorage if Im already mapping?

Posted: Tue Jun 11, 2013 2:31 pm
by John Herdean

my Truck project is already shared with you guys so feel free to check in to see what else i might be missing. Thanks.


Do I Need any JS Code to store any values to Local STorage if Im already mapping?

Posted: Tue Jun 11, 2013 5:56 pm
by John Herdean

Ohh BTW, to get to the page:

Driver Login My Profile:

and valid driver cell phone #'s are:
"248-222-5555" should return a "1" for the id;
"248-555-2345" should return a "2" for the id;
"345-555-8765" should return a "3" for the id

any other number or anything else (no matter what it is even if its left empty) will result in the a server response of exactly "-1" always when theres not a valid driver cell phone # entered.


Do I Need any JS Code to store any values to Local STorage if Im already mapping?

Posted: Tue Jun 11, 2013 7:42 pm
by Maryna Brodina

Hi, in service driver_profile you get a number in response from server. As we see from your screenshot you called variable in response as " id", it's not right. Every variable without name should be called as $. In service driver_profile rename variable on response tab from id to $.