Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing values in <SELECT> boxes

Status
Not open for further replies.

HugoLeite

Programmer
May 22, 2003
18
PT

Is there any way of passing the values stored in an array using the method POST ?
 
you can insert any value anywhere on the page with the use of objects. eg: layers, form objects, div's etc...

BUT you cannot pass those values with javascript and request them only with javascript if that is the question. You will need server intervention to process that data

____________________________________________________
The most important part of your thread is the subject line.
Make it clear and about the topic so we can find it later for reference. Please!! faq333-2924

onpnt2.gif
 
I'm sorry, I didn't explainded the problem well, I was in a hurry.


I have a form with two select's, i pass some values from the first to the second and store them in an array, how do i pass the values that are in that array.


<------------------ Function I'm using ---------------
function one2two() {
m1len = m1.length ;
for ( i=0; i<m1len ; i++){
if (m1.options.selected == true ) {
m2len = m2.length;
m2.options[m2len]= new Option(m1.options.text);
}
}

for ( i = (m1len -1); i>=0; i--){
if (m1.options.selected == true ) {
m1.options = null;
}
}
}

function two2one() {
m2len = m2.length ;
for ( i=0; i<m2len ; i++){
if (m2.options.selected == true ) {
m1len = m1.length;
m1.options[m1len]= new Option(m2.options.text);
}
}
for ( i=(m2len-1); i>=0; i--) {
if (m2.options.selected == true ) {
m2.options = null;
}
}
}
<-------------------- The SELECT's -----------------
<select name=&quot;m1&quot; multiple size=&quot;10&quot;>
<option value=&quot;45&quot; >1 H Clean</option>
.
.
.
</select>

-- -- -- -- --

<select name=&quot;m2&quot; size=&quot;10&quot; multiple >
</select>




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top