PIRATED 20130914 1606

PIRATED 20130914 1606

NOTE: This content appears to have been plagiarized. Please leave a comment or email tnwiki at Microsoft (with a link to this article) if we are mistaken. The content was pulled from the following source:
The community rules state:
  • "Someone else has relevant content and you want to help them share it with the world. It's a nice thought, but do not copy other people's content to the Wiki, even if the owner said it was OK."



ASP.net code behind using Update panel or XMLHttpRequest is more slower than the jquery. jquery can do this real quick and with good user experience.

$(document).ready(function() {

    $('#btnRight').click(function(e) {
        var selectedOpts = $('#lstBox1 option:selected');

        if (selectedOpts.length == 0) {
            alert("Please select item (s) to move.");
            e.preventDefault();
        } 

        $('#lstBox2').append($(selectedOpts).clone());
        $(selectedOpts).remove();
        e.preventDefault();

    });

   $('#btnLeft').click(function(e) {
        var selectedOpts = $('#lstBox2 option:selected');

        if (selectedOpts.length == 0) {
            alert("Please select item (s) to move.");
            e.preventDefault();
        }

        $('#lstBox1').append($(selectedOpts).clone());
        $(selectedOpts).remove();
        e.preventDefault();
    });
});​
Leave a Comment
  • Please add 1 and 1 and type the answer here:
  • Post
Wiki - Revision Comment List(Revision Comment)
Sort by: Published Date | Most Recent | Most Useful
Comments
  • Carsten Siemens edited Revision 2. Comment: Pirated Content - see my comment

Page 1 of 1 (1 items)
Wikis - Comment List
Sort by: Published Date | Most Recent | Most Useful
Posting comments is temporarily disabled until 10:00am PST on Saturday, December 14th. Thank you for your patience.
Comments
  • Carsten Siemens edited Revision 2. Comment: Pirated Content - see my comment

  • NOTE: This article was reported as Pirated/Plagiarized Content (content you didn't write) and will be removed. Please do not steal content from others. If you feel we are mistaken, please leave a comment or email tnwiki at Microsoft with a link to this article and with clear and detailed reasons why you own the content or have explicit permission from the author.

    Content was taken from: "How to move items between ListBox using jQuery"

    Published by jQueryByExample on MAY 21, 2012

    jquerybyexample.blogspot.com/.../how-to-move-items-between-listbox-using.html

Page 1 of 1 (2 items)