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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:51:41+00:00 2026-06-17T13:51:41+00:00

here is my html: <select id=list name=list size=10 multiple> <option value=xx>opt-1</option> <option value=yy>opt-2</option> <option

  • 0

here is my html:

<select id="list" name="list" size=10 multiple>
  <option value="xx">opt-1</option>
  <option value="yy">opt-2</option>
  <option value="zz">opt-3</option>
</select>

I am getting value of this as:

var list_v = $("#list").val();

submitting using the .post call as:

'&mylist='+list_v

in the cgi I am collecting like this(perl):

@list_values = $q->param('mylist');

I am getting all selected options as just one element in the @list_values array. I thought i should be getting all values as separate elements of the array!!!

So, for example, if anyone selects opt-1 and opt-2 I expect in @list_values [xx yy] (two values as two elements)

BUT, I am instead getting [xx,yy ] (two values as one element)

  • 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-17T13:51:42+00:00Added an answer on June 17, 2026 at 1:51 pm

    If I understood you correctly, you should make use of .serialize method. It would give you list[]=xx&list[]=yy if two options were selected. Then you no longer have to construct your data parameters string manually:

    $.ajax({
        url: '/post-collector',
        method: 'POST',
        data: $('#your-form').serialize()
    });
    

    You can see the difference here: http://jsfiddle.net/QeqvF/

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

Sidebar

Related Questions

A sample of the HTML snippet is here: <select name=paytitle id=paytitle> <option value=Budget Keeper
Okay, right now I have a form that contains this select list: <%=Html.LabelFor(x =>
Here's my HTML. Apologies for formatting - this is my first-ever question! <div id=Template>
how can i get select value of dropdownlist and here is my code which
Here is my grid which is in MyPartialView: @(Html.Telerik().Grid<MyClass>() .Name(GridMyClass) .ToolBar(commands => commands.Insert().ButtonType(GridButtonType.BareImage)) .DataKeys(keys
Ok, so here is my code. I am trying to select a picklist value
I'm using a multiple select HTML form input to allow a user to pick
I'm trying to select a value from a textbox that display a list of
Consider the following example: ( live demo here ) HTML: <div class=board> <div class=row>
Fiddle is here - http://jsfiddle.net/ashwyn/a45ha/ HTML here - <div class=parent> <div class=a>Class A</div> <div

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.