ok, java wizzes, here is my concept:
on the page I am using on click event to call the function; I am sending the element's ID:
... onclick="checkAdmin(this.id);"...
and here starts all the problems. the element's id is stored in the layerID; now, if I hard code it like this:
function checkAdmin(layerID) {
layerID = document.all.userInfoLayer.style.display;
alert(layerID);
}
the value I get is 'none' which is true and I am ok with it;
to make things more interesting, I would like to access the element's value by using something like this:
function checkAdmin(layerID) {
layerID = Eval('document.all.'+layerID+'Layer.style');
alert(layerID.display);
}
so far, no luck; can you help out here? what I am missing? I have tried numerous combinations (with quotes or without...), and I was not able to make it work Sylvano
dsylvano@hotmail.com
on the page I am using on click event to call the function; I am sending the element's ID:
... onclick="checkAdmin(this.id);"...
and here starts all the problems. the element's id is stored in the layerID; now, if I hard code it like this:
function checkAdmin(layerID) {
layerID = document.all.userInfoLayer.style.display;
alert(layerID);
}
the value I get is 'none' which is true and I am ok with it;
to make things more interesting, I would like to access the element's value by using something like this:
function checkAdmin(layerID) {
layerID = Eval('document.all.'+layerID+'Layer.style');
alert(layerID.display);
}
so far, no luck; can you help out here? what I am missing? I have tried numerous combinations (with quotes or without...), and I was not able to make it work Sylvano
dsylvano@hotmail.com