Everything else except for closeChild on a dojox ContentPane works in my application on moving to 1.2.0.
This appears to be related to bug #7801. I have filed this as ticket #7915.
For example, I have the following three files. The first sets up the tab container. The second is the initial content, and the third is just a blank page. In Firefox 2, if I click on Add Tab in the start pane, go back to the start pane, and click on Remove Tab, which closes the new content pane, I get an "already called" error.
---------------------------
<head>
<title>On-demand Secure Circuits and Advance Reservation System</title>
<style type="text/css">
@import "lib/dojo/dijit/themes/tundra/tundra.css";
@import "lib/dojo/dojo/resources/dojo.css";
</style>
<script type="text/javascript" src="lib/dojo/dojo/dojo.js"
djConfig="parseOnLoad: true, isDebug: true">
</script>
<script type="text/javascript">
dojo.require("dojo.parser");
dojo.require("dijit.layout.TabContainer");
dojo.require("dijit.form.Form");
dojo.require("dijit.form.Button");
dojo.require("dojox.layout.ContentPane");
</script>
</head>
<body class="tundra">
<div id="mainTabContainer" dojoType="dijit.layout.TabContainer" doLayout="false">
<div id="startingPane" dojoType="dojox.layout.ContentPane" title="start"
href="start.html" selected="true">
</div>
</div>
</body>
<title>On-demand Secure Circuits and Advance Reservation System</title>
<style type="text/css">
@import "lib/dojo/dijit/themes/tundra/tundra.css";
@import "lib/dojo/dojo/resources/dojo.css";
</style>
<script type="text/javascript" src="lib/dojo/dojo/dojo.js"
djConfig="parseOnLoad: true, isDebug: true">
</script>
<script type="text/javascript">
dojo.require("dojo.parser");
dojo.require("dijit.layout.TabContainer");
dojo.require("dijit.form.Form");
dojo.require("dijit.form.Button");
dojo.require("dojox.layout.ContentPane");
</script>
</head>
<body class="tundra">
<div id="mainTabContainer" dojoType="dijit.layout.TabContainer" doLayout="false">
<div id="startingPane" dojoType="dojox.layout.ContentPane" title="start"
href="start.html" selected="true">
</div>
</div>
</body>
-------- start.html
<head>
<script type="text/javascript">
function addTab() {
var newPane = new dojox.layout.ContentPane(
{title:'Test', id: 'testPane'},
dojo.doc.createElement('div'));
newPane.setHref("newTab.html");
var mainTabContainer = dijit.byId("mainTabContainer");
mainTabContainer.addChild(newPane, 0);
newPane.startup();
}
function removeTab() {
var mainTabContainer = dijit.byId("mainTabContainer");
mainTabContainer.closeChild(dijit.byId("testPane"));
}
</script>
</head>
<body>
<form id="testForm" dojoType="dijit.form.Form">
<button dojoType="dijit.form.Button" id="addTab">
Add Tab
<script type="dojo/method" event="onClick">
addTab();
</script>
</button>
<button dojoType="dijit.form.Button" id="removeTab">
Remove Tab
<script type="dojo/method" event="onClick">
removeTab();
</script>
</button>
</form>
</body>
<script type="text/javascript">
function addTab() {
var newPane = new dojox.layout.ContentPane(
{title:'Test', id: 'testPane'},
dojo.doc.createElement('div'));
newPane.setHref("newTab.html");
var mainTabContainer = dijit.byId("mainTabContainer");
mainTabContainer.addChild(newPane, 0);
newPane.startup();
}
function removeTab() {
var mainTabContainer = dijit.byId("mainTabContainer");
mainTabContainer.closeChild(dijit.byId("testPane"));
}
</script>
</head>
<body>
<form id="testForm" dojoType="dijit.form.Form">
<button dojoType="dijit.form.Button" id="addTab">
Add Tab
<script type="dojo/method" event="onClick">
addTab();
</script>
</button>
<button dojoType="dijit.form.Button" id="removeTab">
Remove Tab
<script type="dojo/method" event="onClick">
removeTab();
</script>
</button>
</form>
</body>
----- newTab.html

I am experiencing the same problem
Seems to be with tabs opened with a href
same here
It happens for me when I try to change a dojox.layout.ContentPane content with dijit.byId(paneId).setHref(URL) and only the second time.
No problem when run on an empty ContentPane
Same problem with "dojox.layout.FloatingPane"
Process description:
There is a foursquare div on page , then double-click it , a FloatingPane came out with the content from another web page. It worked both in IE or FF.
But once I closed the FloatingPane , there is an error:
In FF:
already called!
[Break on this error] undefined
On firebug.
In IE:
Line: 1
Char:1
Error: already called!
The error didn't display on "dojoDebug" , it's on IE's left-bottom .
Scripts is here:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link id="themeStyles" rel="stylesheet"
href="/Libs/dojo/dijit/themes/tundra/tundra.css">
<link rel="stylesheet"
href="/Libs/dojo/dojox/layout/resources/FloatingPane.css">
<link rel="stylesheet"
href="/Libs/dojo/dojox/layout/resources/ResizeHandle.css">
<style type="text/css">
.register {
position: absolute;
left: 10px;
top: 10px;
height: 50px;
width: 50px;
background-color: gray;
text-align: center;
}
</style>
<script type="text/javascript" src="/Libs/dojo/dojo/dojo.js"
djConfig="isDebug: true,parseOnLoad: true"></script>
<script type="text/javascript">
dojo.require("dojox.layout.FloatingPane");
function register(){
var node = document.createElement('div');
dojo.body().appendChild(node);
dojo.addClass(node,"testFixedSize");
var tmp = new dojox.layout.FloatingPane({
title:"Register As New Member",
dockable: false,
maxable: true,
closable: true,
resizable: true
},node);
tmp.href = "/Study/dojo/demo/register/register.html";
tmp.startup();
tmp.resize({ w:500, h:300 });
}
</script>
</head>
<body class="tundra">
<div class="register" id="icon_register" ondblclick="register()">Register</div>
</body>
FloatingPane error
What version of Dojo are you using? The ContentPane error was fixed in 1.2.2.
Still getting this error in 1.2.3
When debugging in ie via Visual Studio, I see that the problem is happening in _loadCheck. I'm using dojo version 1.2.3.
Is anyone else still having this problem?
Yep, I'm still seeing it.
I seem to be seeing it as well. Seems to be the same problem of _onLoadHandler getting called twice.
Let me restart that...
I'm getting in in the onLoad handler. I have a simple function reference in onLoad and _onLoadHandler seems to get called twice, resulting in the "Already Called" error.
got the same error message
I have been searching for some valuable information on how to solve that "already called" error but did not have much luck. However, in the end I solved it for me and maybe, that could also help someone else. I am about to convert an existing application to a BorderContainer layout using a dojox.ContentPane. It is probably not the same error that you guys experienced but on one page loaded into the ContentPane there was a document.write() statement within the body which caused the "already called" error for me. Maybe that is an obvious error but since I am not a JS guru...
Already Called
Hey,
I'm no longer having the issue and that's because I'm limiting the times I use id as an attribute of dojo tags. Instead, I'm trying to use jsId. It doesn't work every time (like in grid), but in the places I've made the change, I've had great results.
Hope this helps.