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

  • Home
  • SEARCH
  • 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 8728175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:34:22+00:00 2026-06-13T08:34:22+00:00

I wish to save the values from the input boxes in a dynamically created

  • 0

I wish to save the values from the input boxes in a dynamically created form but I´m having some trouble constructing the object that is to put into the IndexedDB objestStore.
I need something like this:

[{"name": "box1 value", "last name": "box2 value", "age": "box3 value"},{"name": "box4 value", "last name": "box5 value", "age": "box6 value"}]

propriety names have to stay the same (equal to the indexes in the objectStore), only the values change.

The code:

var rows = document.getElementById('myTable').getElementsByTagName('tbody')[0].getElementsByTagName('tr');
for (i = 0; i < rows.length; i++) {
    var boxes = rows.getElementsByClassName('input');
    for (i = 0; i < boxes.length; i++) {

       objectStore.put('values');

    };  
};

I’m trying JSON.stringify(); but I’m not getting it to work…
Any ideas?

  • 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-13T08:34:24+00:00Added an answer on June 13, 2026 at 8:34 am

    I think the best thing to do is:
    – Give all input fields for the same property the same name attribute
    – retrieve for each row the values of these input fields
    – Construct the object
    – save the object.

    In pseudo code:

    for each (row in rows){
      var obj = {};
      obj.name = row.getElementByName('name').value;
      obj.lastname = row.getElementByName('lastname').value;
      obj.age = row.getElementByName('age').value;
    
      objectStore.put(obj)
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

PEAR's HTTP_Request2 - I've got a HTTP_Request2_CookieJar object that I wish to save for
I wish to save some semantic information about data in a table. How can
I have following XML, and i wish to save its data in my SQL
I wish HTML could do something semantically equivalent to this; <dl class=main-list> <definitionitem> <dt>Some
I have created some code to popup a confirm dialog if a user tries
This code below is using the FWRITE function. however i wish to save the
I wonder if anyone can help, i wish to save a variable globally for
I'm trying to read some values into an array in an .each do code
I have a custom slider-type object, that I wish to make more usable. Currently
Im creating a GSP form that i wish to submit using the $.ajax() call.

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.