the error is:
missing ] after element list
el is an element that I have retrieved with getElementByID.
Does anyone else find that these sort of annoying JS errors occur frequently and can cause your work to grind to a halt.
:bawling: :confused: :mad:
or am I just stupid?
Have to see more of your code to tell...
Wouldn't you need to do an eval() there
Just a guess and certianly not tested.
An eval(), in this case, shouldn't be needed (this is based from experience and not tested). When you would run the code:
The eval() would create:
where el would be evaluated out to it's value. Then, from there, it would be run in a setTimeout() (which would need the absent quotation marks), so it wouldn't work. However, you could run:
Which would work, but so would his original code (atleast it should).
WIth the original code, it looks like you're passing the layer object, rather than the layerID, but if you were passing the layerID, you would need to surround it with strings, like: