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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T20:10:39+00:00 2026-06-04T20:10:39+00:00

I have the following two variables. I will send the data variable to the

  • 0

I have the following two variables. I will send the data variable to the server, and upon return, want to access the various original values.

I could do some sort of eq(1).val() approach to either the data or raw variable, but then need to make sure I am accessing them in the right order which might result in future maintenance issues. Or I can get the values from the original DOM using the name selector, but it seems like I am doing the work twice. Or I can add IDs as well as names to the original form, but that seems like a waste.

Ideally, I would be able to convert the form’s name/value to some sort of object, but unlike serializeArray would not make an array, but have the value directed tied to the name. For instance, if my form had <input name="foo" value="bar">, I would be able to access the value as newObject.foo.

Any suggestions on the best way to do this?

var raw=$("#form_id").find('input,select');
var data=raw.serializeArray();
  • 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-04T20:10:41+00:00Added an answer on June 4, 2026 at 8:10 pm

    You can do this by directly accessing the form:

    var form = $("#form_id")[0];
    console.log( form.foo.value );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have following two arrays. I want the difference between these two arrays. That
Let's say I have any array Trial() As Integer I have two following variables
Suppose I have the following two data structures: std::vector<int> all_items; std::set<int> bad_items; The all_items
I have a variable that will have the following values: blah = # 1,
I have the following program where two variables are to be passed by reference
How to wrap one div around another? I have following two div ids: #course
I have the following two tables, affiliates and referrers. affiliates Table id loginid 3
I have the following two projects in in Flex Builder 3: One AS3 library
I have the following two tables: Customer { int Id int Name } Bills
I have the following two queries: select count(*) from segmentation_cycle_recipients scr , segmentation_instance si

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.