473,385 Members | 1,344 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,385 software developers and data experts.

Multiple selection values

I am trying to retrieve selected values from a multiple select object
on a page:

*** Selection Page ***
<form name="theForm">
<select name="numbers" MULITPLE>
<option value="1">One</option>
<option value="2">Two</option>
<option value="2">Three</option>
</select>
</form>

What I want to do is to pass the selected values from "Selection page"
to its parent window. Right now, I pass the values by doing this (in
JavaScript):

window.opener.parentForm.num.value = document.theForm.numbers.value;

I'm assuming if mulitple selections are made (lets say One and Two are
selected), document.theForm.numbers.value will be a collection of the
selected option values. Is this correct?

If so, how can I retrieve each option value when coding parent window?
Thanks.

BUNG
Jul 20 '05 #1
1 1404
bu**@telusplanet.net (Bung) writes:
I'm assuming if mulitple selections are made (lets say One and Two are
selected), document.theForm.numbers.value will be a collection of the
selected option values. Is this correct?


No. It will just be the first selected option. You have to run through the
options manually to see which are selected.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: svdh2 | last post by:
I have been looking at a problem the entire week in access, I have still not been able to find a solution. Hope that you could maybe tell where to look Concerns the link between Access and Word....
2
by: bienwell | last post by:
Hi all, I've got a problem with getting the data values from multiple selections in the list box. I could only get the value and the index of the first item from the selection, but not the...
10
by: ads | last post by:
hi, after binding the dropdownlist to a datasource, ive experience this error "Cannot have multiple items selected in a dropdownlist" after using the code:...
4
by: paul.chae | last post by:
I have a table in Access with about 3000 records. There are ~60 unique values in the ID field for the 3000 records. What I would like to do is automatically generate multiple Excel worksheets...
0
by: Waran | last post by:
Hi, I have form where i am using a listbox where we can select multiple values.I am storing the selected values concatenating with commas(for eg. "22,21,19,16").Now i have to update this form, so...
60
by: Shawnk | last post by:
Some Sr. colleges and I have had an on going discussion relative to when and if C# will ever support 'true' multiple inheritance. Relevant to this, I wanted to query the C# community (the...
1
by: shidram | last post by:
Hello sir, I have problem while using javascript with HTML multiple selection tag, I want to write javascript in such a way that if a I change the option by clicking on the radio button on html...
2
by: Samuels90 | last post by:
Hey everyone, I need to find a value in a pivot table with a range of values over 12 months (Book5) when 3 criteria are met, Branch#, LOB# and Month#. Sum(if() works for the 1st month, but I do...
482
by: bonneylake | last post by:
Hey Everyone, Well i am not sure if this is more of a coldfusion problem or a javscript problem. So if i asked my question in the wrong section let me know an all move it to the correct place. ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...

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.