I have an issue that I've never encountered before. I would like simply to add a div inside another. I test using the developer console first. I get the element in which I want to include the another div and it prints the element correctly in the console. Then I do the following:
document.getElementById("ctiGlobalContainer").innerHtml += '<div id="ctiContentPanel" state="displayed" style="z-index: 10000;right: 0;top: 50px;height: 100%;width: 200px;position: fixed;margin: 0;"></div>'
I get the following result:
"undefined<div id="ctiContentPanel" state="displayed" style="z-index: 10000;right: 0;top: 50px;height: 100%;width: 200px;position: fixed;margin: 0;"></div>"
Why is the undefined showing ? And the div is not included in the dom...