The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Local Storage of float values html+JS
pricelessbrewing
post Jun 7 2016, 01:50 PM
Post #1


Novice
**

Group: Members
Posts: 22
Joined: 11-January 16
Member No.: 23,897



https://jsfiddle.net/r3ck6a59/5/#&togetherjs=Je92AClhEb

So I have two buttons, one to save variables, and one to load them. Then there's an input.

This is part of a larger page, https://jsfiddle.net/sdjqbwpe/1/ if you need a bigger picture.

Messed with this for a few hours, lots of googling was done. The best I could have happen was to place a blank value in the input field when loaded, so my guess is something is going on incorrectly for the setter. I did a test where I saved to a new var SavedBatchVol, then BatchVol = SavedBatchVol in the load function and that worked perfectly, so I'm probably just not following the syntax for the setter, or it's not working for some other reason like float vs string. IDK.

Help please?

Attached are two rar's. One is the simplified version, only including the parts I'm curious about. The other is the full code.


Attached File(s)
Attached File  LocalStorageSimple.rar ( 589bytes ) Number of downloads: 178
Attached File  TestingSavingData.rar ( 11.86k ) Number of downloads: 145
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pricelessbrewing
post Jun 7 2016, 11:45 PM
Post #2


Novice
**

Group: Members
Posts: 22
Joined: 11-January 16
Member No.: 23,897



Got it working. Feel free to close this
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
CharlesEF
post Jun 8 2016, 06:19 PM
Post #3


Programming Fanatic
********

Group: Members
Posts: 1,981
Joined: 27-April 13
From: Edinburg, Texas
Member No.: 19,088



Glad you got it working. For future reference, when posting a sample page, please be sure the page works. I downloaded the short version and found it was not a working sample. The Javascript and JQuery files were not included in the page (in fact, the whole HTML structure was missing). The way I look at it is, if I'm willing to take the time to try and help then the least you can do is provide a working sample.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 25th April 2024 - 05:21 AM