Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

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.



Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap