Shlomi
Posts: 0
Joined: Wed Mar 28, 2012 7:20 am

Adding suffix to local variable

Hi,

I would like to use input from the user (mobilesearchbar1), add suffix to it (as hello), and saving it to local variable (locInputSuffix) using the following java script:

var s = Tiggr('mobilesearchbar1');
localStorage.setItem('locInputSuffix', 's.val()+hello');

But it doesn't work. Any idea why?

Thx,
Shlomi

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

Adding suffix to local variable

Try:
code
localStorage.setItem('locInputSuffix', s.val()+'hello');
/code

Shlomi
Posts: 0
Joined: Wed Mar 28, 2012 7:20 am

Adding suffix to local variable

Cool!

Return to “Issues”