Michael Klauss
Posts: 0
Joined: Thu Mar 15, 2012 3:55 pm

STRING MAPPED FROM LOCALSTORAGE

Hi Tiggzi!

I ́m trying calling my service sending a string which is saved in LocalStorage. When i ́m testing the service and put the string direct in the value field... works very well...but when i get the string by LocalStorage and send to my service, my service return my string with plus signal (+++) between the string.

This is the last call of my service, when a get the details about each element. For example:

Cms Cesario de Mello - Ap53 - saved in LocalStorage - ok
Cms+Cesario+de+Mello+-+Ap53 - My service returned it.

When i put : the string (Cms Cesario de Mello - Ap53 ) and called my service..works... because the name it ́s the search field about each element... don ́t exist id. The name is unique.

But when a mapped my service to send the string by LocalStorage...i don ́t know what happen...my service didn ́t return my unique element because can ́t find the name with the plus signal(+) between the string.

Can you help me...I tried insert the javascript with a regular expression...but didn ́t work.

For example... EXAMPLE

myString = "localStorage.getItem('nomeUnidSaude');
myString = myString.replace(/\+/g, " ");
alert(myString);
Tiggr('searchparam').text(myString);

I don ́t know what can i have to do to send my string without the plus (+).

Thanks!

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

STRING MAPPED FROM LOCALSTORAGE

From the code example you provided at the end, please add the output that you see (invalid) and the output you want to see (valid).

Michael Klauss
Posts: 0
Joined: Thu Mar 15, 2012 3:55 pm

STRING MAPPED FROM LOCALSTORAGE

Hi Max,

Sent a email with the print of my screen..step by step..

http://mkblog.exadel.com/2012/03/how-...

Thanks!

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

STRING MAPPED FROM LOCALSTORAGE

I'll test this again, it might be a bug. Instead of using of Using Set Local Storage Variable action, save the variable in local storage directly using setItem(key, value) and then get the value using getItem(key);

Michael Klauss
Posts: 0
Joined: Thu Mar 15, 2012 3:55 pm

STRING MAPPED FROM LOCALSTORAGE

Hi Max!

Please, help me!

what happened? My token is not being displayed ... my first service is no longer receiving the token response. Did you change anything?

Michael Klauss
Posts: 0
Joined: Thu Mar 15, 2012 3:55 pm

STRING MAPPED FROM LOCALSTORAGE

Hi Max,

Worked! Did you change anything?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

STRING MAPPED FROM LOCALSTORAGE

No, we didn't change anything. Glad it's working.

Michael Klauss
Posts: 0
Joined: Thu Mar 15, 2012 3:55 pm

STRING MAPPED FROM LOCALSTORAGE

Hi Max,

I need your help to get text of the label.

I ́m trying:

var nomeUnidSaudeLocal = Tiggr('labelNomeItemUnidadeSaude').value;

alert(nomeUnidSaudeLocal);

localStorage.setItem('nomeUnidSaudeLocal', nomeUnidSaudeLocal);

can you help me?

Thanks!

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

STRING MAPPED FROM LOCALSTORAGE

It is Tiggr(id).val() - it's jQuery Mobile object: http://help.gotiggr.com/documentation...

Michael Klauss
Posts: 0
Joined: Thu Mar 15, 2012 3:55 pm

STRING MAPPED FROM LOCALSTORAGE

Hi Max,

Didn ́t work.

This label is the label of my list.

Alert printing blank.

var nomeUnidSaudeLocal = Tiggr('labelNomeItemUnidadeSaude');

alert(nomeUnidSaudeLocal.val());

localStorage.setItem('nomeUnidSaudeLocal', nomeUnidSaudeLocal);

Return to “Issues”