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!

getElementbyId in Firefox

Status
Not open for further replies.

cleanair4me46

Technical User
Feb 3, 2009
41
US
I have getElementById working in IE but it wont work with Firefox.
Anything I need special in Firefox to work with getElementById?
 
getElementbyId works just fine in FF there should be no difference, how are you attempting to use it?
Can we see a code snippet that illustrates the problem?

Perhaps posting this in forum216 may be more suitable.




----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Make sure you have correct HTML syntax.
Code:
<html>
<head>...</head>
<body>
...
</body>
</html>
Had the same problem when one of theese tags were missing.
 
make sure the element you are calling has an ID and make sure they are unique to that element :]

such as <div id="thisName"... or <select id="thatName"

________________________________
Top 10 reasons to procrastinate:
1)
 
I have found that IE will use the name attribute in the getElementById() function when the id attribute is missing. This is not correct and encourages non-standard HTML. IE is full of such allowances - it is best to test code in FireFox to ensure standards compliance. Most of what works in FireFox will work in IE (but not vice versa)

Einstein47 (Starbase47.com)
“PI is like love - simple, natural, irrational, endless, and very important“
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top