maxpouliot
04-25-2007, 07:23 PM
Hi,
i have a multiple select box
<select onchange='getvalue(this)' class=textField multiple size="5" id="fenetre" name="fenetre">
and a function :
[CODE]function getvalue(nom)
{
var selectedValue=nom.value;
alert(selectedValue);
}CODE]
my problem is the following :
when i click on an option in the select box, the alert always shows me the first option that is selected. For example, if i click the third option and the first option is already selected, the alert shows the value of the first option when i want to know which option the user has just clicked.
Thanks
i have a multiple select box
<select onchange='getvalue(this)' class=textField multiple size="5" id="fenetre" name="fenetre">
and a function :
[CODE]function getvalue(nom)
{
var selectedValue=nom.value;
alert(selectedValue);
}CODE]
my problem is the following :
when i click on an option in the select box, the alert always shows me the first option that is selected. For example, if i click the third option and the first option is already selected, the alert shows the value of the first option when i want to know which option the user has just clicked.
Thanks