PDA

View Full Version : Display dialog on menu click from north panel



Mohammed
24 Mar 2007, 4:38 PM
guys,

am evaluating your tools since last couple of days. I would like to know how to set the dialog on top of panel ?

I mean, basically i tested complex layout(http://www.yui-ext.com/deploy/ext-1.0-alpha3/docs/). Works perfect !!! Then i added menu(example) into the North section of Layout. Works perfect !!!. Now i would like to show Layout dialog (example) when menu item (from example say split button > Excellent ) is fired. Got puzzled, how ?

I played with menu.js script (example) and tried to call showDialog function from layout.js. But, found its wrong since, i didnt specify HTML Object. Is there a way we can specify object from js.

Because, am failing to use menu click event to fire dialog, i created a simple button in south pannel so when clicked displays layout dialog. Now, on clicking the button, the dialog comes and disappears and making the page disabled. I think its coming but on back side of the panel. how to bring it to the front ?

i tested the same button example style provided under examples section by specifying button in centre panel. it works perfect !!! why cant i specify the same on button click or menu click event.

Your help and support is highly appreciated. Thank you

JeffHowden
24 Mar 2007, 7:19 PM
The HTML element for the dialog must be a child of the body, not a child of some other html element.

Mohammed
24 Mar 2007, 8:36 PM
am sorry Jeff cant get what you have said.

my question was if its possible to display dialog from north panel menu click event ? any sample, doco etc...

so, you are trying to say since menus are created seperately in a js (menus.js)... we cannot have click events tobe handled within this scripts for dialog...is that correct ?

here is how i have called menus into my north panel in complex HTML section


<div id="north" class="x-layout-inactive-content">


<script type="text/javascript" src="../form/states.js"></script>
<script type="text/javascript" src="menus.js"></script>
<div id="toolbar"></div>

</div>


child of the body...sounds like within north pannel section i have to create menus and handle their events...if so, how can i get cool menus explained in demo sections which am after. i think its possible to display dialogs with http://developer.yahoo.com/yui/menu/ menus...since they are created within body of main html. any clue how to get demo menus

Thank you in advance

Mohammed
29 Mar 2007, 2:05 PM
many thanks jeff,

this too got solved !!!