eemerge
22 Mar 2007, 3:43 PM
Hello,
I am playing with the Complex Layout example,modifying and trying to learn how to use this. What im trying to do is:
having some buttons on the west panel, when i click one, i want to add a tab in the center panel.
i am using this code:
<ul>
<li onclick="test1();">Categorii
Subcategorii
Produse
Caracteristici produse
Clienti
Comenzi
[/list]
this is the 'menu' in the west panel.
test1 is a function , defined like this:
function test1()
{
layout.beginUpdate();
layout.add('center', new YAHOO.ext.ContentPanel('center1', {title: 'Close Me', closable: true}));
layout.endUpdate();
}
i did a small modification, i declared the " var layout; " outside the function:
<script type="text/javascript">
//var mainLayout;
var layout;
Example = function(){
return {
init : function(){
layout = new YAHOO.ext.BorderLayout(document.body, {
......
When i click the 'button' inthe west panel, i get an error in FireBug (firefox)
this.dom has no properties
[Break on this error] this.addClass(className);return this;},removeClass:function(className){if(classN...
if anyone could help, would be appreciated.
Thanks.
I am playing with the Complex Layout example,modifying and trying to learn how to use this. What im trying to do is:
having some buttons on the west panel, when i click one, i want to add a tab in the center panel.
i am using this code:
<ul>
<li onclick="test1();">Categorii
Subcategorii
Produse
Caracteristici produse
Clienti
Comenzi
[/list]
this is the 'menu' in the west panel.
test1 is a function , defined like this:
function test1()
{
layout.beginUpdate();
layout.add('center', new YAHOO.ext.ContentPanel('center1', {title: 'Close Me', closable: true}));
layout.endUpdate();
}
i did a small modification, i declared the " var layout; " outside the function:
<script type="text/javascript">
//var mainLayout;
var layout;
Example = function(){
return {
init : function(){
layout = new YAHOO.ext.BorderLayout(document.body, {
......
When i click the 'button' inthe west panel, i get an error in FireBug (firefox)
this.dom has no properties
[Break on this error] this.addClass(className);return this;},removeClass:function(className){if(classN...
if anyone could help, would be appreciated.
Thanks.