Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
AW: [Javascript] value of select
- From: borchers at tridem.de (Michael Borchers)
- Subject: AW: [Javascript] value of select
- Date: Tue Apr 26 09:25:03 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?!
- Prev by Date: [Javascript] event bubbling/propagation problem
- Next by Date: [Javascript] two javascript oddities
- Previous by thread: [Javascript] value of select
- Next by thread: [Javascript] Two JS interfering with each other?
- Index(es):