PDA

View Full Version : BorderLayout and show div element



masudkuet
22 Dec 2006, 9:27 PM
hi,

I have created a main layout using BorderLayout with document.body.

There I assosiated all div elements with all regions.

I have one extra div which I want to show/hide by clicking buttons of other div's.

What I need in this regard??

I have tried this...


//this div doesn't belong to any region of the layout but resides in the body
<div id="hidden-element-to-show" style="visibility:hidden;">

test</p></div>

showDiv()
{
var elm = getEl('hidden-element-to-show');
elm.alignTo('some-region-elm', 'tl', [0,0]);
elm.show();
}

what I need to do?
thanks.

jack.slocum
23 Dec 2006, 4:27 AM
<div id="hidden-element-to-show" style="visibility:hidden;position:absolute;z-index:1000;">

test</p></div>

You can try various z-index values, I just plugged in a big one. :)