If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Senior Member
    Join Date
    Sep 2011
    South Africa
    Member #
    Hi guys. I am stuck on where to start with the Javascript. I want to move selected items over to the other box but just dont know where to start. Please help me!

    My code is as follows:

    <!DOCTYPE html>
    <html lang="en">
        <meta charset="utf-8">
        <title>Listbox test</title>
    #container {
        width: 450px;
        height: 112px;
        margin-top: 300px;
        margin-left: auto;
        margin-right: auto;
        border: 1px solid #F30;
        background-color: #F7F7F7;
        -webkit-border-radius: 10px;
    <script type="text/javascript">
    /* <![CDATA[ */
    function moveItem() {
          if(moveItem === -1) {
            for (var i=0; i < document.forms[0].moveItem; i++) {
    /* ]]> */
    HTML Code:
    <div id="container">
    <form action="" method="post" name="moveList">
    <table width="450" border="0">
        <td align="center">
        <select name="names_1" size="6" multiple="multiple" id="names">
        <option value="charles">Charles</option>
        <option value="craig">Craig</option>
        <option value="lillian" >Lillian</option>
        <option value="brent" >Brent</option>
        <option value="chris">Chris</option>
        <td width="100" align="center" ><input name="" onclick="moveItem()" type="button" value="<<" />
        <input name="" onclick="moveItem()" type="button" value=">>" /></td>
        <td align="center">
        <select name="names_2" size="6" multiple="multiple" id="names">
        <option value="angela">Angela</option>
        <option value="karen">Karen</option>
        <option value="patricia">Patricia</option>
        <option value="johnathan" >Johnathan</option>
        <option value="tania" >Tania</option>


  3. #2
    Senior Member
    Join Date
    Sep 2011
    South Africa
    Member #
    Can anyone help me with this?

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search tags for this page

how to move selected list javascript


javascript listbox move left right

Click on a term to search for related topics.
All times are GMT -6. The time now is 08:18 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: