AW: [Javascript] value of select
Michael Borchers
borchers at tridem.de
Tue Apr 26 09:25:32 CDT 2005
>>>
I don't know why it doesn't worked or if should it work, but you can try
removing the 'options' statement
var myComboBox = document.orders.orders_status_id; //this is just for
simplifying
var orders_status_id = myComboBox[myComboBox.selectedIndex].value;
// myComboBox.options[0] is the same as myComboBox[0]
Second: have you realised that in the "OPTION" that says '1' it's value
is empty and in the "OPTION" that says '2' it's value is '1', right?
<<<
i found the main mistake and the reason the script worked out fine for you.
i had a second form later and it worked perfectely too.
i found now reason why because the syntax and everything else was
correct.
but then i recognized that i had the select field twice.
once at the beginning of the form AND at the end.
i always scrolled down to the bottom that's why i didn't see it.
now it works!
by the way:
how would i have to read out the value regarding DOM - byElement?!
More information about the Javascript
mailing list