This is probably basic by I have tried several things out of my book and I am getting no where
I have a
DIV ID="layer1"From a link, I am passing a variable to my function
Javascript:function("layer1");That part is all working fine.
Where I am running into problems is:
Instead of using
window.layer1.style...I want to use the variable I passed
var LayerNameto do something like
window.GetElementByID(LayerName).style...But it doesn't work.
I know I have the syntax wrong. Can someone help me out?
SOLVED document.getElementById()Document, not window. Corrected capitalization (mistyped it here).