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>

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.