Wolfgang
1 Mar 2007, 5:00 PM
I use the following fragment (method defined in my borderlayout object) to set an url for a given panel.
// load content from url to a given panel
loadContent : function(panel, url) {
var myp = layout.findPanel(panel);
if (myp) {
myp.setUrl(url);
myp.refresh();
}
},
and call it like this:
NGGui.loadContent('center', 'settings/extensions/test.php')
or
NGGui.loadContent('center','calls/tree_test.php')
The problem: If i switch between this panel and another panel, these panel does always load both scripts. I.e. i get two XHR request, one for test.php and one for tree_test.php. It seems they are ordered alphabetically, because test.php is always the one shown in the given panel.
I guess this is wrong, because setUrl should overwrite any existing URL, but not append an URL.
Although using firebug, i cannot see what is going wrong.
I am using alpha2
// load content from url to a given panel
loadContent : function(panel, url) {
var myp = layout.findPanel(panel);
if (myp) {
myp.setUrl(url);
myp.refresh();
}
},
and call it like this:
NGGui.loadContent('center', 'settings/extensions/test.php')
or
NGGui.loadContent('center','calls/tree_test.php')
The problem: If i switch between this panel and another panel, these panel does always load both scripts. I.e. i get two XHR request, one for test.php and one for tree_test.php. It seems they are ordered alphabetically, because test.php is always the one shown in the given panel.
I guess this is wrong, because setUrl should overwrite any existing URL, but not append an URL.
Although using firebug, i cannot see what is going wrong.
I am using alpha2