advertisement
Premier Club Log In/Registration
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   SKILLBUILDING  |   TIP BANK  |   SOURCEBANK  |   FORUMS  |   NEWSLETTERS
Browse DevX
Download the code for this article
Partners & Affiliates
advertisement
advertisement
advertisement
Average Rating: 3.8/5 | Rate this item | 31 users have rated this item.
 

How To Move Items Between Lists with JavaScript

You've seen pick lists in Windows where you select an item from one ListBox and it moves to a second ListBox (or vice versa). This solution shows you how to recreate that interface pattern in a browser. 


advertisement
ntil recently, moving data between HTML lists was problematic due to differences in each browser's DOM; however, as browsers move toward W3C DOM compliance, those differences are disappearing rapidly. In this article, I'll show you how to use standards-based DOM methods and JavaScript to move data from one HTML list to another.



You've seen those pick lists in Windows where you select an item from one ListBox and it moves to a second ListBox (or vice-versa). How can you recreate that interface pattern in a browser?


Use the Document Object Model (DOM) and some JavaScript to control the list's options array, and the task is easy.

  Next Page: The List Selection User Interface


Page 1: IntroductionPage 3: Start the Script
Page 2: The List Selection User InterfacePage 4: Finish the Script
Please rate this item (5=best)
 1  2  3  4  5
advertisement
Advertising Info  |   Member Services  |   Permissions  |   Contact Us  |   Help  |   Feedback  |   Site Map  |   Network Map  |   About

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs