Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Javascript "options value" works in Firefox but not in IE

 
John Zwick
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The following works in firefox but is not working in IE where I am getting the error:
"Error: 'options' is null or not an object
Code: 0"



How can I get this to work in IE?
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And what does alert(dropDownElement ) tell you?

Eric
 
Mike Dell
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eric Pascarello wrote:And what does alert(dropDownElement ) tell you?

Eric


You would get [object] in IE
and [Object HTMLSelectElement] in Firefox

also, correct me if I am wrong but getElementById doesn't work correctly in IE... it also gets the elements with name=id
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64851
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mike Dell wrote:correct me if I am wrong but getElementById doesn't work correctly in IE

It works fine, but it will find things by name as well in a non-standard fashion, so you could say that it's broke. But for finding things by id, it's fine.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic