Solved

Seeking "drag and drop" code that works well for 'select' listboxes

Posted on 2009-06-29
14
284 Views
Last Modified: 2012-05-07
I have "select" listboxes on my webpage and I'm seeking code that will enable 'drag and drop' functionality.  Can this be done with 'select' listboxes?  References to sample code please?

Thanks!
0
Comment
Question by:BBRRGG
  • 4
  • 4
  • 2
  • +1
14 Comments
 
LVL 8

Expert Comment

by:lharrispv
ID: 24737633
I am not sure what you asking.  You want your end users to be able to drag the list box to somewhere else on their screen?  Is this correct?
0
 

Author Comment

by:BBRRGG
ID: 24737661
Not the listbox itself... just strings from within 1 'select' listbox to another 'select' listbox.
0
 
LVL 8

Expert Comment

by:lharrispv
ID: 24737823
I am sorry I am still not sure I am following.  Is this what you are asking?
Assume these are my two lists....
List 1
- buttons
-threads
-processes

list 2
- servers
- work stations
- routers

You want your end user to be able to select buttons from the list 1 and drag it and dop it into list 2 so that list 2 now reads

list 2
- servers
- work stations
- routers
- buttons

and list one would now read

List 1
- threads
-processes
?

If so may I ask why?
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 11

Expert Comment

by:tobzzz
ID: 24738562
I would say you could customise this code, it uses jQuery:
http://thechriswalker.net/select-drag/

it's probably just changing <DIV> to <OPTION> fundamentally.
0
 

Author Comment

by:BBRRGG
ID: 24738765
lharrispv: "...You want your end user to be able to select 'buttons' from the list 1 and drag it and dop it into list 2..."

Correct, except the records in List1 do not necessarily have to disappear from List1 when they are dragged to List2.  The reason is to allow this webpage user to build his/her customized list from a larger list.
0
 
LVL 8

Expert Comment

by:lharrispv
ID: 24739063
0
 

Author Comment

by:BBRRGG
ID: 24741669
lharrispv: these sites appear to be for Windows forms, not web forms

tobzzz:
http://thechriswalker.net/select-drag/
this would work, but it uses <ul> (unordered lists) and not listboxes.  

Any further suggestions would be greatly appreciated on how to move records between listboxes on web forms.
0
 
LVL 40

Expert Comment

by:mrjoltcola
ID: 24775455
I have no specific sample code, but I did not see anyone mention ExtJS. Here is a Javascript framework we use, and it does have drag-and-drop capability.

Try this sample, it includes draggable components.

http://www.extjs.com/deploy/dev/examples/desktop/desktop.html
0
 
LVL 40

Accepted Solution

by:
mrjoltcola earned 200 total points
ID: 24775460
Actually here is a sample using a grid.

http://extjs.com/deploy/dev/examples/dd/dnd_grid_to_grid.html
0
 
LVL 8

Assisted Solution

by:lharrispv
lharrispv earned 200 total points
ID: 24803437
0
 

Author Closing Comment

by:BBRRGG
ID: 31597977
Great, thanks!
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question