?
Solved

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

Posted on 2009-06-29
14
Medium Priority
?
290 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
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 800 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 800 total points
ID: 24803437
0
 

Author Closing Comment

by:BBRRGG
ID: 31597977
Great, thanks!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

765 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