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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:16:25+00:00 2026-06-11T20:16:25+00:00

I get from server into client side only pure number IDs, how to add

  • 0

I get from server into client side only pure number IDs, how to add dynamically it to html hidden field so that looks like array or JSON format (I mean: ["32","33","34"]), so that in next step I can receive on serwer and parse? Hidden field contains on start only blank brackets [].

My current code override hidden field from [] to e.g. "32":

$("#myHiddenField").val(JSON.stringify(data.result[0].newid));
  • 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-11T20:16:27+00:00Added an answer on June 11, 2026 at 8:16 pm

    You can use $.parseJSON() to deserialize the array from the hidden input value, push() the new item, then serialize the array again:

    var $hiddenField = $("#myHiddenField");
    var results = $.parseJSON($hiddenField.val());
    results.push(data.result[0].newid);
    $hiddenField.val(JSON.stringify(results));
    

    However, it might be more efficient to keep track of the array as items are added, and only serialize it when the form is submitted (in a submit event handler, for instance).

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

Sidebar

Related Questions

in ext.net library, how can I get from server side code the double clicked
In my project ,I get json data from Server,there's a field named 'creat_at' in
i am using following webservices for retrieving data from server server side:.net client side:ksoap2
I get data from server: store = new dojox.data.QueryReadStore({url:http://url_with_data}); ... myGrid = new dojox.grid.DataGrid({id:myGrid2,selectionMode:none,style:height:
I am using jQuery to get data from server. Data is coming. Here what
i am developing an app in which i get data from server and display
I want to make queries according to the parameters I get from my server
I'm developing an android application which uses web service to get data from server,
I get json string from server. Then I parser it using SBJSON library. But
How can we get data from the server in an asynchronous way in Flash?

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.