Muchas muchas gracias.
Código HTML:
<html> <head> <script type="text/javascript"> function pasar() { obj=document.getElementById('comprador'); if (obj.selectedIndex==-1) return; valor=obj.value; txt=obj.options[obj.selectedIndex].text; obj.options[obj.selectedIndex]=null; obj2=document.getElementById('comprador2'); opc = new Option(txt,valor); eval(obj2.options[obj2.options.length]=opc); } function pasar2() { obj=document.getElementById('comprador2'); if (obj.selectedIndex==-1) return; valor=obj.value; txt=obj.options[obj.selectedIndex].text; obj.options[obj.selectedIndex]=null; obj1=document.getElementById('comprador'); opc = new Option(txt,valor); eval(obj1.options[obj1.options.length]=opc); } </script> </head> <body> <table><tr><td> <?php echo '<select name="comprador" size="10" multiple="multiple" id="comprador" style="width:250px">'; $Comp = mysql_query('SELECT Id, empresa FROM Comprador'); while ($Compr = mysql_fetch_array($Comp)){ echo '<option value="'.$Compr["Id"].'">'.$Compr["empresa"].'</option>'; } echo '</select>'; ?> </td><td> <input type="button" value=" >> " onClick="pasar()"> <br/> <input type="button" value=" << " onClick="pasar2()"> </td><td> <select id="compraor2" size="10"> </select> </td></tr></table> </body> </html>