cowabunga1984
27 Sep 2007, 2:46 AM
Hi all :)
Here what I want to do:
I want to place a toolbar into the 'center'-region of a LayoutDialog. I don't want to user html-code to do that.
Here my problem:
The toolbar is always placed into the document.body and not in my LayoutDialog.
Here my code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>ExtJs - Example</title>
<!-- Include YUI utilities and Ext: -->
<script type="text/javascript" src="web/js/ext1_1_1/adapter/yui/yui-utilities.js"></script>
<script type="text/javascript" src="web/js/ext1_1_1/adapter/yui/ext-yui-adapter.js"></script>
<script type="text/javascript" src="web/js/ext1_1_1/ext-all-debug.js"></script>
<!-- Include Ext stylesheets here: -->
<link rel="stylesheet" type="text/css" href="web/js/ext1_1_1/resources/css/ext-all.css">
<link rel="stylesheet" type="text/css" href="web/js/ext1_1_1/resources/css/ytheme-vista.css">
<!-- Init namespace -->
<script type="text/javascript">
Ext.onReady(function() {
// create dialog
var myDivDialog = Ext.DomHelper.append(document.body,
'<div></div>', true);
var myDialog = new Ext.LayoutDialog(myDivDialog, {
height: 400,
width: 500,
center: {}
}
);
// create toolbar
var myDivToolbar = Ext.DomHelper.append(document.body,
{tag: 'div'}, true);
var myToolbar = new Ext.Toolbar(myDivToolbar);
myToolbar.addButton({
text: 'Test'
}
);
// create center-panel
var myDivPanel = Ext.DomHelper.append(document.body,
{tag: 'div'}, true);
this.theCenterPnl = new Ext.ContentPanel(myDivPanel, {
toolbar: myToolbar
}
);
myDialog.show();
});
</script>
</head>
<body>
</body>
</html>I hope you can help me :)
Regards,
cowabunga
Here what I want to do:
I want to place a toolbar into the 'center'-region of a LayoutDialog. I don't want to user html-code to do that.
Here my problem:
The toolbar is always placed into the document.body and not in my LayoutDialog.
Here my code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>ExtJs - Example</title>
<!-- Include YUI utilities and Ext: -->
<script type="text/javascript" src="web/js/ext1_1_1/adapter/yui/yui-utilities.js"></script>
<script type="text/javascript" src="web/js/ext1_1_1/adapter/yui/ext-yui-adapter.js"></script>
<script type="text/javascript" src="web/js/ext1_1_1/ext-all-debug.js"></script>
<!-- Include Ext stylesheets here: -->
<link rel="stylesheet" type="text/css" href="web/js/ext1_1_1/resources/css/ext-all.css">
<link rel="stylesheet" type="text/css" href="web/js/ext1_1_1/resources/css/ytheme-vista.css">
<!-- Init namespace -->
<script type="text/javascript">
Ext.onReady(function() {
// create dialog
var myDivDialog = Ext.DomHelper.append(document.body,
'<div></div>', true);
var myDialog = new Ext.LayoutDialog(myDivDialog, {
height: 400,
width: 500,
center: {}
}
);
// create toolbar
var myDivToolbar = Ext.DomHelper.append(document.body,
{tag: 'div'}, true);
var myToolbar = new Ext.Toolbar(myDivToolbar);
myToolbar.addButton({
text: 'Test'
}
);
// create center-panel
var myDivPanel = Ext.DomHelper.append(document.body,
{tag: 'div'}, true);
this.theCenterPnl = new Ext.ContentPanel(myDivPanel, {
toolbar: myToolbar
}
);
myDialog.show();
});
</script>
</head>
<body>
</body>
</html>I hope you can help me :)
Regards,
cowabunga