I've been working on creating a Windows Desktop Gadget. I can create HTML elements I want with document.createElement. I can set their attributes and I can get those attributes after setting them, but anything I do to modify the document just fails completely silently. I'm not seeing any errors at all, but the gadget just doesn't change. Even something as simple as document.body.innerHTML = "asdf";
does absolutely nothing. The same code in IE8 works perfectly fine. What am I missing here?
gadget.xml:
<?xml version="2.0" encoding="utf-8" ?>
<gadget>
<name>Citrix Logon Controller</name>
<version>0.1</version>
<author name="Brian G. Shacklett">
<info url="http://digital-traffic.net" />
</author>
<copyright>© Brian G. Shacklett</copyright>
<description>Controls Citrix Logons.</description>
<hosts>
<host name="sidebar">
<base type="HTML" apiVersion="1.0.0" src="gadget.html" />
<permissions>Full</permissions>
<platform minPlatformVersion="1.0" />
</host>
</hosts>
</gadget>
HTML:
<html>
<head>
<title>Citrix Manager</title>
<script type="text/javascript">
debugger;
</script>
<script src="scripts/debug.js" type="text/javascript"></script>
<script src="scripts/gadget.js" type="text/javascript"></script>
<script src="scripts/util.js" type="text/javascript"></script>
<link type="text/css" rel="stylesheet" href="styles/gadget.css" />
</head>
<body >
<div id="header"><h1>Citrix Manager</h1></div>
<div id="mainContent">
<a href="#" onClick="window.location.reload()">reload</a><br />
<a href="#" onClick="testFunction();">New Server</a>
</div>
</body>
</html>
gadget.js:
function testFunction()
{
document.body.innerHTML = "asdf";
}