Hi I have a page with a navigation menu on the left and when I click on any link in this menu, an Ajax get call is sent to the server and the right side is updated with a new page.
How am I doing this now, having created 2 columns, the left col contains the navigation link, and the right column contains the div with the name content that has dojotype dojox.layout.ContentPane.Now, when the data is received from the server, I change its contents as follows
dijit.byId("thecontent").setContent=data
Now, when I click on the navigation link, the right side gets (there are digits on this page, as well as some scripts to handle onclick events). But firebug returns an error saying
"Tried to register widget with id==thecontent but that id is already registered"
my main dojo include looks like this: -
<script type="text/javascript" src="http://o.aolcdn.com/dojo/1.5/dojo/dojo.xd.js"djConfig="parseOnLoad:false"></script>
I do dojo.parser.parse () in the dojo.addOnLoad function as follows: -
dojo.addOnLoad(function(){ dojo.require("dijit.form.Button"); dojo.require("dijit.form.Textarea"); dojo.require("dijit.form.ValidationTextBox"); dojo.require("dojox.layout.ContentPane"); dojo.require("dijit.Editor"); dojo.addOnLoad(function(){ dojo.parser.parse(); sendgetrequest();
I also cannot run any scripts on this newly loaded page. There is no onclick event, only dijit widgets are displayed ...
source share