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 8916413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T05:14:13+00:00 2026-06-15T05:14:13+00:00

How can I save data (searches) in session/localmachine , I mean, save anywhere less

  • 0

How can I save data (searches) in session/localmachine, I mean, save anywhere less DB, all form fields for future use everytime that form is submited?

(…)

$('#button_submit').click(function() {
    var start_date = $('#start_date').val();
    var end_date = $('#end_date').val();
    var type = $('#type').val();
    var tempArr = new Array();
    var json = window.sessionStorage['search'];
    if(json)
        tempArr = JSON.parse(json);
    tempArr.push(JSON.parse('{"start_date" : "'+start_date+'" , "end_date" : "'+end_date+'" , "type" : "'+type+'"}'));
    window.sessionStorage['search'] = JSON.stringify(tempArr);
    drawChart(start_date, end_date, type)
}); 

(…)

This code dont solve my problem.

I need to save start_date, end_date and type values everytime form is submited and create some buttons/links for that old searches to be able to see old results.

The point is grab those values and stick them in this drawChart(start_date, end_date, type). This is the function that will produce my results.

with my code i got this [{"start_date":"2012-02-05","end_date":"2012-12-26","type":"pie"}] this is tempArray[0]. But what I need is grab this start_date, end_date and type separated values , not like it is atm

  • 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-15T05:14:17+00:00Added an answer on June 15, 2026 at 5:14 am

    For this problem, the use of suitable object localSorage, though it is not supported by all browsers. Supported browsers: http://www.w3schools.com/html/html5_webstorage.asp

    Example

    localStorage.setItem('resultSearch', JSON.stringify({a: "1234"}));
    .....
    // submit, and reload page
    var b = JSON.parse(localStorage.getItem('resultSearch')); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I try to create a form that can save a person's form data so
Is there a way that i can save data on each step in wizard
How can I save data from an Excel sheet to .RData file in R?
I want to setup a table that can: Save the data on the user's
I'm developing web app that user can save his/her work to server. The data
I am creating a HTML layout where user can fill the data and save
class Node { FooType Data; // I can save Data to file with extension
I'm trying to use MongoDB to cache some data for me, but I can't
I can save image to iPhone (iPhone Photo Albums \ Saved Photos) with UIImageWriteToSavedPhotosAlbum(image,
Is there anyway I can save a List variable to the Androids phone internal

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.