Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8957223
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:56:17+00:00 2026-06-15T14:56:17+00:00

I am making a webapp, that uses mobiscroll as a number counter. The numbers

  • 0

I am making a webapp, that uses mobiscroll as a number counter. The numbers are saved via a submit button below it. The problem I have is whenever the user presses the home button, when the webapp is reloaded, it resets the number list. I figured it would be a good idea to save the value to localstorage,and recall it when the app is reopened. Now that’s where I am stuck.

Here is the function for the button press that works fine:

<script type="text/javascript">
    function save_it() {
        //Save the scroll value for later
        var scrollsave = $('#i').scroller('getValue');
        localStorage.setItem("scrollsave", scrollsave);
        localStorage.saveServer
    }
</script>

I have a function further up, that is giving me trouble, and refusing to work proper, I have tried the following methods:

My first attempt to assign

<script type="text/javascript">
    $(function () {
        var scrollstate = localStorage["scrollsave"];
        if (scrollstate != null) {
            $('#i').scroller('setValue', scrollstate);
        }

    });
</script>

I get an error of, Object x,x,x,x has no method ‘join’.

Second attempts to convert to array and back, but no luck.

var oldscroll = localStorage.getItem["scrollsave"];
var finalsaved = SON.parse(oldscroll);
if (finalsaved != null) {
    $('#i').scroller('setValue', finalsaved);

The documentaion on mobiscroll is here http://docs.mobiscroll.com/22/mobiscroll-core . And it says, “scroller values from the data parameter passed as array”.

My key, scrollsave is stored with a value of 1,2,1,1 . Which seems to meet the correct formatting to throw into the mobiscroll part.

I have a feeling there is something trivial I am overlooking, but I can’t figure out what.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T14:56:18+00:00Added an answer on June 15, 2026 at 2:56 pm

    var oldscroll = localStorage.getItem["scrollsave"]; should be var oldscroll = localStorage.getItem("scrollsave");

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a webapp I'm making that stores user information, and their preferences regarding
I have a web app I'm making to run off a CMS that is
I am making a webapp. I have a fairly basic question about javascript performance.
I'm making a webapp that takes country short code (google app engine get from
I've got a web app in asp.net that uses an Infragistics control for making
I'm making a trivia webapp that will feature both standalone questions, and 5+ question
I'm making a web app that uses geolocation, and I'm whipping up a nearby
I have a web app that currently uses the current HttpContext to store a
Let's say I have an ASP.NET MVC webapp that calls a repository layer, which
I am building a webapp that will display PDFs. The PDFs have fillable forms.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.