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!
1 person has
this question
+1
This topic is no longer open for comments or replies.