PDA

View Full Version : HELP: one stupid thing



gibberish
10 Jan 2007, 9:41 PM
I am trying to create nested iframes in the center area of a border layout. When I do, the first panel shows up properly, next to the default "tab". Subsequent nested iFrames are generated WITHIN the first iframe. I am sure I have a DOM reference screwed up or something but I just can not seem to find it - been working on it for a day now and none of the examples I have found appear to be showing anything different than what (i THINK) I am doing.

The issue started when I was trying to add a tool bar to the nested layout panel. Another set of eyes would be greatly appreciated. Again, I am a newbee so verbose explaination would be greatly appreciated.

Thanks

--

Gibberish

JS snippet

innerLayout = new YAHOO.ext.BorderLayout('main', {
north: {
split:false,
initialSize: 25,
minSize: 25,
maxSize: 25,
autoScroll:false,
collapsible:false,
titlebar: false,
animate: true,
cmargins: {top:2,bottom:0,right:0,left:0}
},
center: {
autoScroll:false,
titlebar: false,
closeOnTab: true

}
});



showProfile : function(entity,entityID,entityName)
{


var src = 'aaron/test.php?myID layout='+ entityID;
innerLayout.beginUpdate();

layout.add('center', new YAHOO.ext.NestedLayoutPanel(innerLayout, {title:'Tab', closable:true}));



var tb = new YAHOO.ext.Toolbar('toolbar-tb');
tb.addButton({text: 'View in New Tab'});
tb.addSeparator();
tb.addButton({text: 'View in New Window'});


var iframe = YAHOO.ext.DomHelper.append(document.body,{tag: 'iframe', id: 'frame_' + entity + '_' + entityID, frameBorder: 0, src: src});


innerLayout.add('center', new YAHOO.ext.ContentPanel(iframe,{title: 'Tab', fitToFrame:true, closable:true}));

innerLayout.add('north', new YAHOO.ext.ContentPanel('preview', {fitToFrame:true, toolbar: tb, resizeEl:'preview-body'}));

innerLayout.endUpdate(true);
layout.endUpdate();
},


HTML snippet


<div id="main" class="ylayout-inactive-content">
<div id="results-grid" class="ylayout-inactive-content"></div>
<div id="preview" class="ylayout-inactive-content">
<div id="toolbar-tb"></div>
<div id="preview-body"></div>
</div>
</div>

http://www.apeware.com/aaron/Pic.jpg