473,405 Members | 2,310 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Get all (selected or unselected) items in a multiple select box

228 100+
Hi,

is there anyway to get all items in a multiple select box using php? I use javascript to populate the select box but i don't want the visitor/user to select everytime he had added before clicking the "Process" selected items button. Hopefully someone will direct me to a php solution here.
Aug 28 '10 #1
1 2567
TheServant
1,168 Expert 1GB
There is, but it is a bit of fiddling. Basically you want to write some javascript which will do that as it populates the select box.

I recommend what you do is print out a javascript array using PHP, and then have the javascript use that array to check if it needs to add HTML to say selected to the select box.
Aug 28 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Ramses van Pinxteren | last post by:
hello, I have a PHP/Javascript problem. If I want to make a multiple select like this one: $html .= "<td><select name='userid' onChange='changeuserinfo()' multiple size='10'>"; $html .=...
2
by: jochen scheire | last post by:
Hello, I use a multiple select in a form in an asp page. When I go to the target page, I want to be able to read out the items selected on the previous page. How can I do that? <form...
1
by: Wim Roffal | last post by:
In a normal select I can see with selectedIndex which option is selected. However, I was wondering how I can see the same thing in a multiple select where more than one option is selected. ...
1
by: sab | last post by:
Hi, We have a web form with a listbox. The listbox is a multiple select listbox and has data that looks something like: ALL Unit 1 Unit 2 Unit 3 Note: "ALL" is always the first item in...
4
by: rn5a | last post by:
A Form has 2 select lists. The 1st one whose size is 5 (meaning 5 options are shown at any given time) allows multiple selection whereas the 2nd one allows only 1 option to be selected at a time. ...
2
by: Rowan | last post by:
I have a form that has several multiple select menus. I would like to save the multiple selections but be able to show them as selected items when the form data is updated. <select...
25
by: bonneylake | last post by:
Hey Everyone, Well i am not sure if my question needs to be here or in coldfusion. If i have my question is in the wrong section i am sorry in advance an will move it to the correct section. ...
1
Claus Mygind
by: Claus Mygind | last post by:
After the user has made their selection from a multiple select box how can I read the options array to see which items were selected <select id ="PHASECODE" name="PHASECODE" ...
2
by: phpnewbie26 | last post by:
I currently have two drop down menus where the second one is populated from the first one. My second drop down menu should be able to do multiple selection. I have searched online and found out how...
6
by: phpnewbie26 | last post by:
My current form has one multiple select drop down menu as well as few other drop down menus that are single select. Originally I had it so that the multiple select menu was first, but this created...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.