get ElementById in firefox
hay all,
in IE I get get a reference to an element inside an element by using
document.getElementById('FirstelementName').document.getElementById('SecondelementName').
but it does not work in firefox.
how can i get the reference to the second element?
Re: get ElementById in firefox
What does document.getElementById('SecondelementName') return to you?
Also be sure that you actually use the ID and not the name to getElementById with. IE is rather lenient when it comes to getElementById() that it'll also look up the name attribute in case it doesn't find stuff. (Have caused me grief more then once)
Re: get ElementById in firefox
To add to this...
Your code below does not make sense. Those are two different statements and should be split at the middle period. The only reason that IE should be understanding them is if Microsoft glitched again.
Code:
document.getElementById('FirstelementName').document.getElementById('SecondelementName')