My proof of concept code now handles when the localStorage is null. You may want to put something like console.log(localStorage.getItem('aboutSetupOne')); and open the Developer tools to see what it outputs.

StevenHu
—
2012-05-16T17:14:31Z —
#12

Do I need to sign in to jsfiddle to make it work? Clicking on the drop-down box does not show anything other than setup 1 and setup 2 in the options. 'Testing' does not appear for me.

Adding the console code shows the var content successfully, so the var content is in memory. It's just not among the options.

Thanks for helping.

cpradio
—
2012-05-16T17:15:50Z —
#13

What browser are you using? I am using Chrome v17 Portable, and in the Result pane I see Testing as the third option

StevenHu
—
2012-05-16T17:26:20Z —
#14

I was using FF. I just tried it in Chrome and I see Testing as the third option. Unfortunately, this code is being run on the iPhone and it has to work there, on Webkit browsers. Since it works on Chrome, it should work on the iPhone. Still need to study this...

cpradio
—
2012-05-16T17:37:54Z —
#15

I can't comment on the iPhone, I don't do any phone development. What I can say, is the code should work on just about any browser (not sure why it failed in Firefox -- I'll take a look as that bothers me; maybe FF doesn't support localStorage?).

cpradio
—
2012-05-16T17:46:37Z —
#16

Got the FF issue resolved. Seems it was failing to load jQuery (due to needing to use POST instead of GET). I just changed the framework to MooTools (since we aren't using a framework, the framework is really unnecessary).