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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T14:49:32+00:00 2026-06-18T14:49:32+00:00

I have many textboxes which are dynamically added through jQuery. they all have same

  • 0

I have many textboxes which are dynamically added through jQuery. they all have same name like…

<input type="text" name="employer" id="employer" />
<input type="text" name="position" id="position" />
<input type="text" name="city" id="city" />

<input type="text" name="employer" id="employer" />
<input type="text" name="position" id="position" />
<input type="text" name="city" id="city" />

so many...

I am passing all textbox value through AJAX, but its not working. my AJAX code is below..

AJAX

$.ajax(
    {
      type: "POST",
      url: $("#cfgRoot").val()+'/accounts/educationInfoPost.php',
      data:
      {
        employer:$("#employer").val().trim(),
        position:$("#position").val().trim(),
        city:$("#city").val().trim()
      }
});

Thanks in Advance

  • 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-18T14:49:34+00:00Added an answer on June 18, 2026 at 2:49 pm
    var empName = $("input[name=employer]").map(function(){
       return $(this).val();
    }).get().join(",");

    And pass it into ajax data.

    Code

    
    var empName = $("input[name=employer]").map(function(){
       return $(this).val();
    }).get().join(",");
    
    var position = $("input[name=position]").map(function(){
       return $(this).val();
    }).get().join(",");
    
    var city = $("input[name=city]").map(function(){
       return $(this).val();
    }).get().join(",");
    
    
    $.ajax(
    {
        type: "POST",
        url: $("#cfgRoot").val()+'/accounts/educationInfoPost.php',
        data:
        {
            employer:empName,
            position:position,
            city:city
        }
    });

    And one more thing DO NOT ADD SAME ID FOR DOM.

    ID MUST BE UNIQUE FOR EACH DOM

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

Sidebar

Related Questions

i have many textboxes on a form and all textboxes require to have a
I have a form in which there are many textboxes (in tabControl layout). I
I have a page in chrome which contains many textboxes and I wish to
In a web page I have many textboxes which from server may have value
Hi I have dynamically added functionality like adding a customer to a customer list
I have a form in which there are many textBoxes from which three textboxes
I have a ASP.NET web page that contains many textboxes. Each textbox has a
I have a form tha contains a TreeView with many Textboxes in each node.
I have many TextBOX in asp.net which accepts the value from user and stores
I have a multiline textbox in which i will be entering many email addresses.

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.