Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
How to pass all value of select list to backend
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Pervez Mulla  
View profile  
 More options Oct 3 2012, 7:59 am
Newsgroups: comp.lang.javascript
From: Pervez Mulla <mullaper...@gmail.com>
Date: Wed, 3 Oct 2012 04:59:29 -0700 (PDT)
Local: Wed, Oct 3 2012 7:59 am
Subject: How to pass all value of select list to backend
In my code I want to pass all the items(values)present in select list to backend, Am trying to do that but am not getting exact result .

Now am able to pass only one item(value) to back-end, Instead of that I want to pass all the value whichever present in select list.

Below is my code

http://stackoverflow.com/q/12706942/1468281

Thank you
Pervez


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dann90...@gmail.com  
View profile  
 More options Oct 3 2012, 2:56 pm
Newsgroups: comp.lang.javascript
From: dann90...@gmail.com
Date: Wed, 3 Oct 2012 11:56:02 -0700 (PDT)
Local: Wed, Oct 3 2012 2:56 pm
Subject: Re: How to pass all value of select list to backend
Not sure anyone understood your plight, as your wording is rather elusive.
What are you specifically trying to do again?  What's the "backend" you're referring to? I saw the code it has nothing resembling items(values) on the markup or the js.  If you meant to ask how to get the selected options of a 'multiple' Select element, check my previous reply to you, you iterate for all .selected ones.

    Danny


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pervez Mulla  
View profile  
 More options Oct 4 2012, 1:57 am
Newsgroups: comp.lang.javascript
From: Pervez Mulla <mullaper...@gmail.com>
Date: Wed, 3 Oct 2012 22:57:20 -0700 (PDT)
Local: Thurs, Oct 4 2012 1:57 am
Subject: Re: How to pass all value of select list to backend

On Thursday, October 4, 2012 12:26:03 AM UTC+5:30, (unknown) wrote:
> Not sure anyone understood your plight, as your wording is rather elusive.

> What are you specifically trying to do again?  What's the "backend" you're referring to? I saw the code it has nothing resembling items(values) on the markup or the js.  If you meant to ask how to get the selected options of a 'multiple' Select element, check my previous reply to you, you iterate for all .selected ones.

>     Danny

Hey Danny,

Actually I want to submit all the items of select list.

Now am able to submit only one value whichever selected in select list,

I want to submit all the item(value) whichever present in the that list box currently , whether the user is selected or not those values.

Hope u got his time.

Thank you
Pervez    


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Evertjan.  
View profile  
 More options Oct 4 2012, 4:03 am
Newsgroups: comp.lang.javascript
From: "Evertjan." <exxjxw.hannivo...@inter.nl.net>
Date: 04 Oct 2012 08:03:52 GMT
Local: Thurs, Oct 4 2012 4:03 am
Subject: Re: How to pass all value of select list to backend
Pervez Mulla wrote on 04 okt 2012 in comp.lang.javascript:

> Actually I want to submit all the items of select list.

> Now am able to submit only one value whichever selected in select
> list,

> I want to submit all the item(value) whichever present in the that
> list box currently , whether the user is selected or not those values.

What nonsense,
a select list is for submitting the one or multiple selected items.

If you want to submit all items select them all.

Wether you do that with javascript or not is immaterial,
until you specify so.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bart Van der Donck  
View profile  
 More options Oct 4 2012, 10:36 am
Newsgroups: comp.lang.javascript
From: Bart Van der Donck <b...@nijlen.com>
Date: Thu, 4 Oct 2012 07:36:10 -0700 (PDT)
Local: Thurs, Oct 4 2012 10:36 am
Subject: Re: How to pass all value of select list to backend

Pervez Mulla wrote:
> In my code I want to pass all the items(values)present
> in select list to backend, Am trying to do that but am
> not getting exact result.

> Now am able to pass only one item(value) to back-end,
> Instead of that I want to pass all the value whichever
> present in select list.

Non-selected values can't be retrieved by the receiving script, because they are simply not passed in the POST/GET request.

One possible workaround is to select everything in the box just before the submit-action:

<form method="get" action="script.php" name="f"
 onSubmit="
           for (var i=0; i<document.f.fruit.options.length; ++i)
             document.f.fruit.options[i].selected = true;
          ">
<select multiple="multiple" name="fruit" size="3">
   <option value="apple">apple</option>
   <option value="pear">pear</option>
   <option value="orange">orange</option>
</select>
<input type="submit">
</form>

Hope this helps,

--
 Bart


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Danny  
View profile  
 More options Oct 4 2012, 2:45 pm
Newsgroups: comp.lang.javascript
From: Danny <dann90...@gmail.com>
Date: Thu, 4 Oct 2012 11:45:10 -0700 (PDT)
Local: Thurs, Oct 4 2012 2:45 pm
Subject: Re: How to pass all value of select list to backend
hmmmm, did you ever bothered reading my reply to your previous issue on Deletion of options? it seems you didn't, as it shows how to get all .selected options.  Anyhow, this was my example, check the code-> http://www.webdevout.net/test?01b&raw

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Evertjan.  
View profile  
 More options Oct 4 2012, 3:57 pm
Newsgroups: comp.lang.javascript
From: "Evertjan." <exxjxw.hannivo...@inter.nl.net>
Date: 04 Oct 2012 19:57:28 GMT
Local: Thurs, Oct 4 2012 3:57 pm
Subject: Re: How to pass all value of select list to backend
Danny wrote on 04 okt 2012 in comp.lang.javascript:

> hmmmm, did you ever bothered reading my reply to your previous issue
> on Deletion of options?

Who is this "you"?

Usenet is not email.

Always quote for reference on usenet.

Anyway: I did not ever bothered!

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dann90...@gmail.com  
View profile  
 More options Oct 4 2012, 4:49 pm
Newsgroups: comp.lang.javascript
From: dann90...@gmail.com
Date: Thu, 4 Oct 2012 13:49:46 -0700 (PDT)
Local: Thurs, Oct 4 2012 4:49 pm
Subject: Re: How to pass all value of select list to backend

har har har, alright, my bad, you == Pervez Mulla, :)

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »