Jump to content

Copying objects from one combo box to another


iPixel

Recommended Posts

Ok here's a table with 2 combo boxes one with options to select from the other one empty, and 2 buttons one which will copy from left to right and one which removes a choice from the right side.

 

I want to do this using javascript, i've seen it done in a few places but i dont really know how to, nor do i know what term i should google.

 

Here's my code, any and all help is much appreciated.

 

<table cellpadding="0" cellspacing="0" border="0" width="100%">
    <tr>
        <td colspan="3" align="center"><h4>Add To Mailing List</h4></td>
    </tr>
    <tr>
        <td width="200">
            <select name="nh_mail" id="nh_mail" size="13" multiple="multiple" style="width:150px;">
                <option value="" disabled="disabled">SELECT ONE</option>
                <option value="Joe Schmo 1">Joe Schmo 1</option>
                <option value="Joe Schmo 2">Joe Schmo 2</option>
                <option value="Joe Schmo 3">Joe Schmo 3</option>
            </select>
        </td>
        <td width="15" valign="middle">
            <center>
            <input type="button" value=">>>" onclick="moveL2R()" />
            <br /><br /><br />
            <input type="button" value="<<<" onclick="remove()" />
            </center>
        </td>
        <td width="200">
            <select name="nh_mail" id="nh_mail" size="13" multiple="multiple" style="width:150px;">
                <option value="" disabled="disabled">CHOSEN</option>
            </select>
        </td>
    </tr>
</table>

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.