Hello, I am stuck again. I am trying to load some javascript (a number spinner) into a Dojo content pane. And I get a nice ugley message:
Message: HTML Parsing Error: Unable to modify the parent container element before the child element is closed (KB927917)
Here is my code. Any ideas?
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/dojo/1.4.0/dojo/dojo.xd.js" djConfig="isDebug: false, parseOnLoad: true"></script>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.4/dijit/themes/tundra/tundra.css" />
<link rel="stylesheet" href="numberspinner.css" type="text/css" media="screen" />
<script type="text/javascript" src="numberspinner.js"></script>
<script type="text/javascript">
var init = function()
{ dojo.require('dijit.layout.ContentPane');
}
dojo.addOnLoad(init);
</script>
</head>
<body class="tundra">
<div id="notworkingtab" dojoType="dijit.layout.ContentPane" title="Location">
<script type="text/javascript">
var abc= new SpinControl();
abc.SetMaxValue(5);
abc.SetMinValue(0);
abc.SetCurrentValue(0);
abc.SetIncrement(0.5);
document.body.appendChild(abc.GetContainer());
abc.StartListening();
</script>
</div></div>
</body>
</html>
And if anyone cares, I got my numberspinner from here: http://www.switchonthecode.com/tutorials/javascript-controls-the-spin-control
It shows me the number spinner, but not the content pane, and I get the error above... If I take the number spinner out the content pane works ok. Or if I take the contentpane out, the number spinner works ok.
Thanks gggggggg