Hello,
For some reason, I am having problems making an event fire on a particular element in my document. The same event listened in the same way fires on other elements, but not this one. There are no other events assigned to this element.
Here is my javascript:
function CallbackFunc(cfe){
window.status = "Fired";
}
// option 1:
function onLoadFunc(){
document.getElementById("main").addEventListener("click", CallbackFunc, false); //works as expected
}
// option 2:
function onLoadFunc(){
document.getElementById("testmeter").addEventListener("click", CallbackFunc, false); //DOESN'T work, i.e. "Fired" won't show up in the status bar
}
and HTML:
...
<body onload="onLoadFunc();">
<div id="main"> <!-- a block element with relative positioning -->
...
<div id="testmeter"> <!-- a block element with absolute positioning -->
...
</div>
...
</div>
</body>
...
What do you think could be causing this problem? Thanks for any help!