English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I am totally puzzled by why IE is not correctly getting the value of a select dropdown list. The following code works perfectly fine in Firefox.





2006-10-04 18:37:56 · 2 answers · asked by Anonymous in Computers & Internet Programming & Design

fsorry, the function is:

function a(){
var s = document.getElementsByTagName("SELECT");
alert(s[0].value);
}

2006-10-04 18:39:11 · update #1

sorry, the function is:

function a(){
var s = document.
getElementsByTagName
("SELECT");

alert(s[0].value);
}

2006-10-04 18:39:59 · update #2

2 answers

Why do you need to specify the class?

All my codes simply use:



**Edit** ahh, so you are trying to send the selected value to a javascript? I'm sorry man, my bad, but I don't know much about java... I strickly use php + html

2006-10-04 18:40:28 · answer #1 · answered by iswd1 5 · 0 0

why dont you try giving an ID to select tag and use getElementByID("MyID") it will work. hope it will work

2006-10-05 02:04:25 · answer #2 · answered by howsureyouare 3 · 0 0

fedest.com, questions and answers