Try this:


listener = new EventListener(list.items[0]);
                        listener.onselect=function(e) {
                                var o = e.getSource();
                                num=o.value;
                                switch(num){
                                case 0:
                                //  place code to execute when list item 0 is
selected
                                break;
                                case 1:
                                //  place code to execute when list item 1 is
selected
                                break;
                                case 2:
                                //  place code to execute when list item 2 is
selected
                                break;
                                case 3:
                                //  place code to execute when list item 3 is
selected
                                break;
                                case 4:
                                //  place code to execute when list item 4 is
selected
                                break;
                                case 5:
                                //  place code to execute when list item 5 is
selected
                                break;
                                case 6:
                                //  place code to execute when list item 1 is
selected
                                break;
                                case 7:
                                //  place code to execute when list item 1 is
selected
                                break;
                                case 8:
                                //  place code to execute when list item 1 is
selected
                                break;
                                }
                                
                        }
                        list.items[0].addEventListener(listener);

I would suggest that you create the loadpane and do
lp.setVisible(false);   then in your listener above,

lp.setVisible(true);
lp.setURL('myurl.html')

then to turn it off when the user clicks on the list
item again:
                        listener.ondeselect=function(e) {
                                lp.setVisible(false);
                        }


see this example page and view the source code:

http://www.merlinsworld.net/dynapi_ri_dcexamples/list_as_pop_menu.html

the clickable menu header is only clickable outside of
the text area, it needs updating.

On another note, I am putting the finishing touches on
a resizing example that just happens to be a document
center.  It uses button.js and scrollpane.  Basic
functions are complete, I am tweaking the resize
capabilities.  Interested?

Cheers,
Dave C.  "You Changed What?!?"

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help

Reply via email to