• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

getElementByID not working in Firefox but works in IE?

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am receiving the following error in the Error Console of Firefox however it works perfectly fine in IE 6:
"dropDownElement is null"



 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I see a name, not an id.

id != name

Eric
 
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Eric Pascarello wrote:I see a name, not an id.

id != name

Eric


As Eric said and just to point this out, line referred is Line 12. 'id' attribute should be added.
 
Himanshu Kansal
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To add, that's not the only funny thing that happens in IE. IE does not follow the strict or transitional parsing of HTML. id can be replaced by name for IE. I am not sure if this is true for IE8 but till 7.x that's the case.

For testing the UI, safari or opera or firefox are good options, also now we have chrome.
 
John Zwick
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the fast replies everyone
I'm going to stop testing using IE once and for all!
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's fine as long as none of your users use it.
 
Himanshu Kansal
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

John Zwick wrote:Thanks for the fast replies everyone
I'm going to stop testing using IE once and for all!


Noooooooooo!!! don't stop testing on it. but do use at least 1 of others.

I test on IE and Opera. We need to test only make sure the UI is consistent and to facilitate the end-user's experience.
 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Himanshu, thats true, which is why I'd wanna repeat what Bear always pushes ... use external libs for some of the DOM and Event stuff, for example Dojo and other frameworks would always work in cross browser way, so you don't have to worry about it yourself and you can focus on the "job" at hand so as to speak.

BTW, on IE, I doubt if there is any organization that has completely abandoned IE testing, most of teams I have worked with test predominantly on IE, and all bugs related to js on Firefox et. al are marked minor (usually the case), but I am pretty sure it varies with organization, but generally one <b>should</b> test on IE. IE8 looks better than 7, but I haven't played with it completely, but there are differences on being non-standard(still ... things like Event bubbling), which stinks, I don't understand why Msft is so hell bent on being non-con formant.

I personally was in love with firebug and Firefox, but then i found Chrome ... it is just so fast (I don't have any benchmarks to back that up I am afraid, just personal experience with it), plus it has firebug kinda thing built into it, much better.

Trilochan.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I develop on Firefox/Safari and test on IE. That way, the code follows the standards and only needs to deviate when it's absolutely necessary in order to work on the toy browser.
reply
    Bookmark Topic Watch Topic
  • New Topic