I'm trying to do :
document.getElementById("header-text").innerHTML = "something interesting";
It's working fine with every browser except Opera (I'm running the latest version).
Browsing the internet I found people saying that Opera does not support innerHTML. That doesn't sound right.
Any pointers?
Thanks
Edit: Here is the id I'm trying to get
<div id="header-text" class="picture-text">
<!--[if gt IE 5]>ugly hack<![endif]-->
Some text generated server side
<!--[if gt IE 5]>ugly hack<![endif]-->
</div>
Edit2: I have the same issue with :
<div id="header-text" class="picture-text">
Static text
</div>
Edit3:
<body onload="intialize();">
function intialize() {
operaHeaderFix();
}
function operaHeaderFix(){
if(window.opera) {
/*opera specific action*/
document.getElementById("picture-line-wrapper").style.position="relative";
document.getElementById("picture-line-wrapper").style.top="0px";
document.getElementById("picture-line-wrapper").style.marginTop="-230px";
document.getElementById("picture-line").style.padding="1px";
document.getElementById("header-text").innerHTML = "<div style='margin:220px 0px 0px 20px;'>"+document.getElementById("header-text").innerHTML+"TEST</div>";
}
}
Edit4: If I remove the if(window.opera), it will run fine in FF and IE