Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Works in IE but not Firefox

Status
Not open for further replies.

cleanair4me46

Technical User
Feb 3, 2009
41
US
I have a getElementById working inside a div tag in a JavaScript that works great in IE but it wont work with Firefox.
Anything special I need to do with div and/or getElementById in Firefox?
 
Show your code, including the HTML where the div has the ID you want to access.

Is there only ONE div with the ID you're trying to access? Does the Firefox error console have any messages about the problem?

IE has often been rather sloppy about things, where Firefox is standards compliant.

Lee
 
Perhaps you have a name attribute but not an ID attribute on the element in question?

If so, that is another fine example of IE letting developers pick up sloppy coding habits...

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Tech Snippets & Info:
 
Making us guess wastes everybody's time and seldom solves anyone's problems.

Show us what you are doing so we can give you answers that make sense.

mmerlinn


"We've found by experience that people who are careless and sloppy writers are usually also careless and sloppy at thinking and coding. Answering questions for careless and sloppy thinkers is not rewarding." - Eric Steven Raymond
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top