Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8349419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T07:59:35+00:00 2026-06-09T07:59:35+00:00

list item is not moving from one list box to another . I tried

  • 0

list item is not moving from one list box to another . I tried to debug script with firefox but it never goes inside the button.click . I am not sure what am I doing wrong . Thanks for your help.

I have a master page :
then I have a content page where I added:

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
      <script src="../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script src="../Scripts/UiEffect/dragdrop.js" type="text/javascript"></script>   
</asp:Content>

Here is my html in content page HTML: List box item I am getting from DB using Databind()

<div class="question">

       <asp:ListBox ID="Allitem" runat="server" Rows="7" Width="200px" ></asp:ListBox>

        <input id="ibtnLeft" type="image"  src="../Images/LeftArrow.png" />
        <input id="ibtnRight" type="image" src="../Images/rightArrow.png" />
       <asp:ListBox ID="selectedItem" runat="server" Rows="7" Width="200px"></asp:ListBox>
    </div>

and here is my j-query for dragdrop.js external file:

$("#ibtnRight").click(function ($e) {
    $("select[id$='Allitem'] option:selected").appendTo($("select[id$='selectedItem']"));
    $("select[id$='Allitem'] option:selected").remove(); $e.preventDefault();
});

$("#ibtnLeft").click(function ($e) {
    $("select[id$='selectedItem'] option:selected").appendTo($("select[id$='Allitem']"));
    $("select[id$='selectedItem'] option:selected").remove(); $e.preventDefault();
});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T07:59:37+00:00Added an answer on June 9, 2026 at 7:59 am

    The code in ‘dragdrop.js’ needs to run after the DOM has loaded, or the selectors may miss their targets that haven’t yet been created.

    $(document).ready(function(){
      // run initializing code here
    });
    

    Also as @Chris has pointed out, the id’s may not render as you think they are. In that case, you can use inline dynamic javascript on the page itself in a script tag:

    <script type="text/javascript">
      $(document).ready(function(){
        $('#<%= Allitem.ClientID %>').doSomething();
      });
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a list box and when clicked on the list item it goes
SELECT * FROM list WHERE list_item LIKE %_1375_% returns results it should not. For
I was thinking about the performance of calling List<T>.Indexof(item) . I am not sure
** I want one single list item to have fistname, last name and the
Currently the list item # appears on the right. If you remove the float
I have a list item with a button inside. When the button is shown,
I've got a list item with an image inside, for example: <ul> <li> <img></img>
I have a List item List<string> xmlValue = new List<string>(); In this I have
When a list item is added to a sharepoint list i want to redirect
I have a list item with buttons in it like so: <mx:List contentBackgroundAlpha=0 baseColor=0x333333

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.