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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T21:17:39+00:00 2026-05-17T21:17:39+00:00

I have multiple select boxes on the page all of which share the same

  • 0

I have multiple select boxes on the page all of which share the same beginning parts of the name attribute. What I need to do is go through each select box on the page with this starting name SELECT___ and grab the name of that select box and whatever the selected option value is and have it formatted like this so that I can then insert it into an Ajax post call as shown below.

Note: the product code is retrieved from the following variable

var global_Current_ProductCode = '100E';

This is the Ajax call. Notice I hard coded the data field and it works but I need to grab the actually selected options value with its corresponding select name.

$.ajax({
url: $("form[name='MainForm']").attr('action'),
data: "SELECT___100E___7=25&SELECT___100E___9=42&btnupdateprice.x=0&btnupdateprice.y=0&ProductCode=100E",
type: 'POST', 
cache: false,
success: function(response) {
result2= $(response).find(".pricecolor .price");
alert(result2.text());
}
});

Here is the select boxes. Please note that there could be one, two or more select boxes on the page. Thanks for any help. Hope I am making sense.

<select onChange="change__option(this.name,this.options[this.selectedIndex].value,this.options[this.selectedIndex].text)" name="SELECT___100E___7">
<option value="0">Select Cart Color</option>
<option value="21">Chrome</option>
<option value="25">Beige/Almond [Add $1.00]</option>
</select>

<select onChange="change__option(this.name,this.options[this.selectedIndex].value,this.options[this.selectedIndex].text)" name="SELECT___100E___9">
<option value="0">Select Cart Color</option>
<option value="27">Red</option>
<option value="42">Beige/Almond [Add $2.00]</option>
</select>

So to sum it up I need the format to be like SELECT___100E___7=25&SELECT___100E___9=42&btnupdateprice.x=0&btnupdateprice.y=0&ProductCode=100E so that I can put it in the data field of the Ajax call. This is assuming that the first select box had the beige/Almond option selected (25) and the second select box also had the beige/almond option (42) selected

  • 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-05-17T21:17:40+00:00Added an answer on May 17, 2026 at 9:17 pm

    You could use jQuery serialize. It simply needs an id attribute on the surrounding <form>. To include other information with the request, such as the product id or price, create corresponding hidden fields and call

    $.ajax({ 
    
    //..
    
    data: $("#form-id").serialize(), 
    
    //..
    
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page with multiple select boxes, as per the following: <select name=item-0-status
I have a page on my site which has multiple drop down boxes as
I have two multiple select boxes. I need to use JQuery to drag selected
Which command will executed first,If a stored procedure have individual multiple select commands;
I have a multiple selection SELECT field which I don't want the end user
I have multiple threads (C# application running on IIS) running that all need to
I have multiple selects: <select id=one> <option value=1>one</option> <option value=2>two</option> <option value=3>three</option> </select> <select
We have multiple MFC apps, which use CMutex( false, blah ), where blah allows
I have multiple classes that all derive from a base class, now some of
I have a PHP page where a user can select a month and then

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.