the java script function that you are looking for is something like this...

function addItemToListBox(itemIndex, srcListBox, destListBox){
//srcListBox and destListBox are objects
        // You will use JavaScript DOM HERE
        //Its something like this:
        destListBox.add(srcListBox.item(itemIndex))
}

function removeItemFromListBox(itemIndex, srcListBox, destListBox){
//srcListBox and destListBox are objects
        // You will use JavaScript DOM HERE
        //Its something like this:
        destListBox.remove(srcListBox.item(itemIndex))
}

You will call your javascript function on button click like this:
onclick="addItemToListBox(document.all.srcListBox.selectedIndex,
document.all.srcListBox, document.all.destListBox)"

It�s something like I describe above, the method names are not correct its
just to help your google research...

Tiago Henrique C. R. Alves
Analista de Sistemas
Politec - CSS
Tel: 3038-6952


-----Mensagem original-----
De: Linda Coleman [mailto:[EMAIL PROTECTED]
Enviada em: segunda-feira, 8 de dezembro de 2003 15:50
Para: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Assunto: RE: [OT] Looking for a Taglib


It's pretty early in the game for me so I'm open to any suggestion. :)

On some pages I have more than one of these "list box choosers" (for 
lack of a better name).
I suppose as long as I pass the two list boxes & buttons, that would work.

I was thinking is would be nice if I could just treat the whole thing as 
one big component.
Say pass the "available" and "selected" collections to a taglib & let it 
do most of the work.
Even using the html taglib, there's quite a bit of configuration do to 
set the labels, listboxes,
collections, button, etc. Oh well, I guess I'll leave it and if it 
become a big problem later
I can roll my own. :)

Thanks for the idea!!
L:)

[EMAIL PROTECTED] wrote:

>As far as I know, there are not any JavaScript-backed tag libraries (I
>am pretty sure that any standard tag library won't provide the dynamic
>features that you are looking for without having to do a page refresh).
>
>Have you considered dumping all your JavaScript to a .js file, importing
>it into your webpage, and associating it with the buttons?
>
>-----Original Message-----
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED]
>Sent: Monday, December 08, 2003 10:07 AM
>To: [EMAIL PROTECTED]
>Cc: [EMAIL PROTECTED]
>Subject: [OT] Looking for a Taglib
>
>
>Hi List,
>
>I have several pages that need to show users a list of available options
>in one listbox, an add & remove button & a list box that shows the 
>options they've already selected. This fairly common in UI's & I've seen
>
>this on a few web pages something like this...
>
>
>Available States                   Selected States
>+------------+                    +--------------+
>| Alabama    |                    | Connecticut  |
>| Alaska     |   +---------+      | Maine        |
>| Arizona    |   |   Add>> |      |              |
>| Arkansas   |   +---------+      |              |
>| California |                    |              |
>| Colorado   |   +---------+      |              |
>| Delaware   |   |<<Remove |      |              |
>| Florida    |   +---------+      |              |
>+------------+                    +--------------+
>
>
>I've looked on Google, SourceForge & Jakarta for a taglib that
>would do something like this, without success.
>
>Obviously the html taglib will help with the buttons & listboxes,
>but there's a lot of javascript needed to support this kind of
>widget & it would be a lot easier to manage if there was a taglib
>that could generate it.
>
>Does anyone know of a taglib that could help with this and/or
>another source finding taglibs?
>
>Thanks in advance.
>Linda :)
>
>
>
>
>
>
>
>
>
>
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to