i am facing an issue and getting error like
“SCRIPT5002 function expected” in internet explorer 7-9.
this is my code :
var myDiv = document.getElementById("divId"); //this line gives me "SCRIPT5002 function expected" error.
myDiv.style.cssText("position:absolute;z-index:999");
myDiv.appendChild(
JavaScriptCode);
so how to solve this??
The problem should be in the 2nd line:
cssTextis not a function, but a property. So call it like this:or (better approach in my opinion, because it is clearer):