Home > Not Working > Div Getelementbyid Not Working

Div Getelementbyid Not Working

Contents

This is extremely frustrating because I know this code should work (I've been testing this code all morning and it was working before). Should I have doubts if the organizers of a workshop ask me to sign a behavior agreement upfront? "president-elect" grammatically correct? It's just a tutorial website. Jun 11, 2009 10:51 AM|NC01|LINK miteshsura Hi, Right click on the web page, view source and check if the control as same ID. http://sevevb.com/not-working/document-getelementbyid-not-working-in-ie.html

Anyways, here is the code using the code tags so maybe somebody can see the error of my ways. Taking Control Back as a DM? I've tested it with FF27.0.1 and IE8 but not with other tags than span. They must match. More Help

Document.getelementbyid Not Working In Chrome

Please check your inbox to confirm your subscription. But what it comes down to is invalid structure. As soon as the span-tags were closed using instead of just the 2nd call of getElementById() works as expected.

The result is the same in both cases, even though the first example shouldn't work. megazoid 2016-01-29 05:10:37 UTC #2 Hi, Just pass another element instead of document.body into scrollTop() function: var myDiv = document.getElementById('my-div'); scrollTo(myDiv, 0, 100); andresb 2016-01-29 07:49:39 UTC #3