I'm referencing the object or object handle incorrectly, is that what 'this.' is called ?
I put together a super simple page demonstrating my ravings and my question using spinning colored boxes.
LINK (see source)
greenbox and #greybox essentially have the same code.
One uses this. and the other uses the var orangehandle
Many thanks in advance
The problem is you're trying to get the element by its ID... before it's been created.
The absolute quickest fix is to just put the <script> tag after the #orangebox element:
var orangevar = document.getElementById("orangebox");
TIL something about parsing
This topic is now closed. New replies are no longer allowed.