onchange function

J

JFM

I have a form with 5 drop down boxes. Each box contains 100 items. The 100
items are the same in each drop box.

What I need to ensure is that the same item is not selected in more than 1
drop box, I need 5 different selections.

I know very little about javascript but what I think I need is like the
following:

<select name="optionlist1" id="optionlist1"
onchange="function(optionlist1)">

It is the function that I am not sure about:

function(listname)
{
if document.forms.listname.value = (any option list value other than the
current one)
{
alert ("you have already chosen that one")
}

}


I do need 5 separate drop boxes, not just a select multiple because each of
the options will be treated in a different way.

Thanks

JFM
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top