Ok. This function style worked fine with iframes but seems to have a problem in DIV tag. I think it is because the iObj isn't there untill an Ajax call is made and a DIV tags innerHTML is changed?
If anybody can tell me what the problem is I'll have my cake and eat it to.
Script
Code:
function f1alarm(){
var iObj=document.getElementsByClassName('button');
for(var i=0; i<iObj.length; i++){
iObj[i].onclick=function(){showt(this);};
}
};
showt(button)//IE8 Error:expected ';' here?{
alert('I am Here!');
}
else{
alert('I am not here!');
}
}

addEvent(window,'load',function(){f1alarm()},false);