-
18 Nov 2006 11:25 AM #1
DomHelper creating Panels to Layout but inactive
DomHelper creating Panels to Layout but inactive
Using Yahoo Ext 0.33-rc1 and Yahoo 0.11.4 (testing in Firefox 1.5.0.8)...
With the DomHelper I create 2 panels and add them to the center layout region. There is no underlying HTML reference rather the DomHelper builds the panels on the fly (i assume). Problem is that the panel I want to show is totally inactive. See below.
Everything gets generated without error but the "Guide" panel is shown and no tabbing is possible to the "Welcome" panel. Any ideas. Have searched the forum without luck. Tried adding autoCreate. No change. Missing some underlying principle.Code:layout.beginUpdate(); var welcome = YAHOO.ext.DomHelper.append(document.body, {tag: 'div', id: 'welcome', cls: 'ylayout-inactive-content'}); var welcomePanel = new YAHOO.ext.ContentPanel(welcome, {title: 'Welcome', id: 'welcomePanel', closable: true}); welcomePanel.setUrl("resources/html/welcome.htm"); var guide = YAHOO.ext.DomHelper.append(document.body, {tag: 'div', id: 'guide', cls: 'ylayout-inactive-content'}); var guidePanel = new YAHOO.ext.ContentPanel(welcome, {title: 'Guide', id: 'guidePanel', closable: true}); layout.add('center', welcomePanel); layout.add('center', guidePanel); layout.getRegion('center').showPanel('welcomePanel'); layout.endUpdate();
Thanks in advance / Matthew
-
18 Nov 2006 12:04 PM #2
The id of a content panel is equal to the id of it's root element. You don't need to supply an id in the config (if you do it is ignored), and you must use the id of the element (or the panel's index) to show the panel.
-
18 Nov 2006 1:05 PM #3
Found the problem
Found the problem
type-o did it. mistake of adding the welcome variable as the element reference to the guidePanel.
Used the DOM Inspector for the first time. . Exactly what I have been looking for. Saw that the 'welcome' id was missing and boom problem solved.
Similar Threads
-
Links and Layout Panels
By finco in forum Ext 1.x: Help & DiscussionReplies: 3Last Post: 26 Mar 2007, 12:44 PM -
Ext.ContentPanel - create inactive
By andrey.korolyov in forum Ext 1.x: Help & DiscussionReplies: 1Last Post: 16 Mar 2007, 5:49 PM -
What's x-layout-inactive-content? (newbie question)
By benkooijman in forum Ext 1.x: Help & DiscussionReplies: 5Last Post: 14 Mar 2007, 10:37 AM -
scrollbars showing thru panels on layout complex.html in fox
By winstonford in forum Ext 1.x: BugsReplies: 2Last Post: 19 Feb 2007, 6:08 AM -
hiding border between layout panels
By wglass in forum Ext 1.x: Help & DiscussionReplies: 2Last Post: 13 Feb 2007, 11:17 AM


Reply With Quote