Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

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?!