i have made an tag trigger function inside an anonymous function , here it is :
(function(){
var getElement = {
getElem: function(element , elemInterval){
if(document.getElementsByTagName('div')[0].onload){
element = document.getElementsByTagName('div')[0];
clearInterval(elemInterval);
element.innerHTML = ' content changed. ';
}
}
}
var element , elemInterval;
elemInterval = setInterval(getElement.getElem(element , elemInterval) , 1000);
})();
what it got to do is to call a function as many time as it needs every one second and check if the first div as been loaded , than it save the element port to the "element" var and change the content of the div.
this seems to not work , what's the problem here?