Finally, when I thought all hopes was out on anyone to clear this one up for me, this
was the info I craved for:
listsel = new EventListener(list.items[0]);
listsel.onselect=function(e) {
// my stuff to do
myInlineLayer1.setVisible(true)
myInlineLayer2.setVisible(false)
myInlineLayer3.setVisible(false)
}
Thanks a lot David! I also have an idea for using it in customising the list widget
into a step-by-step guide companion - something that could be used for a form wizard
etc. Maybe I have a new widget or two to present this weekend (as part of the
ccreation widget pack)
Henrik Våglin [ [EMAIL PROTECTED] ]
----- Original Message -----
From: "David Cushman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 16, 2001 8:50 PM
Subject: Re: [Dynapi-Help] Event onselect in list widget
> Henrik,
> In case you are still having problems with this..
> The select, deselect events in list.js are common to
> all the line items of that widget on the page (if you
> put up two lists, it fires back on both and selecting
> in single mode will deselect in all occurrences of the
> widget. One event listener will allow you to evaluate
> what was picked in any list.
>
> see the example using list as a menu:
> http://www.merlinsworld.net/dynapi_ri_dcexamples/list_as_pop_menu.html
>
> here is the listener from that code:
>
> mxy1 = new EventListener(list1.items[0]);
> mxy1.onselect=function(e) {
> var o2 = e.getSource();
> num=o2.value;
> switch(num){
> case 0:
> win1 =
> open("http://www.merlinsworld.net/dynapi_ri_dcexamples/image_button.html","newWin");
> break;
> case 1:
> colapse();
> //set the list to pop as poph
> poph=list2;
> //var winW = DynAPI.document.w
> var winW = viewrx;
> if (o2.parent.x+o2.parent.w+poph.w>winW) var
> posX=o2.parent.x-poph.w+30;
> else var posX=o2.parent.x+o2.parent.w-10;
> if (posX<0) var posX=o2.parent.x+o2.parent.w-10;
> poph.moveTo(posX,o2.parent.y+o2.y+5);
> poph.setVisible(true);
> o2.parent.deselectAll();
> break;
> case 2:
> colapse();
> poph=list3;
> //var winW = DynAPI.document.w
> var winW = viewrx;
> if (o2.parent.x+o2.parent.w+poph.w>winW) var
> posX=o2.parent.x-poph.w+30;
> else var posX=o2.parent.x+o2.parent.w-10;
> if (posX<0) var posX=o2.parent.x+o2.parent.w-10;
> poph.moveTo(posX,o2.parent.y+o2.y+5);
> poph.setVisible(true);
> o2.parent.deselectAll();
> break;
> case 3:
>
> location="http://www.merlinsworld.net/dynapi_ri_dcexamples/button_menu.html";
> break;
> case 4:
>
> break;
> case 5:
> win1 =
> open("http://www.merlinsworld.net/dynapitest/im06.shtml","newWin");
> break;
> case 6:
> poph=list4;
> //var winW = DynAPI.document.w
> var winW = viewrx;
> if (o2.parent.x+o2.parent.w+poph.w>winW) var
> posX=o2.parent.x-poph.w+30;
> else var posX=o2.parent.x+o2.parent.w-10;
> if (posX<0) var posX=o2.parent.x+o2.parent.w-10;
> poph.moveTo(posX,o2.parent.y+o2.y+5);
> poph.setVisible(true);
> o2.parent.deselectAll();
> break;
> case 7:
>
> location="http://www.merlinsworld.net/dynapitest/im01.shtml";
> break;
> case 8:
>
> break;
> case 9:
>
> break;
> case 10:
>
> break;
> case 11:
>
> break;
> }
>
> }
> list1.items[0].addEventListener(mxy1);
>
> If this does not anwser your question, please ask
> again as I did not understand.
>
> Cheers,
> David C. "You Changed What?!?"
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35
> a year! http://personal.mail.yahoo.com/
>
> _______________________________________________
> Dynapi-Help mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/dynapi-help
>
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help