I have implemented the same with the two listbox in the left(leftlistbox1, leftlistbox2) and one in the right(finallistbox).
What I did, is just capture the id of selected value listbox(the one whose in the left) and then pass that value to the final listbox(in the right).
Steps:
1) Select the value from the left listbox and capture the id of that listbox at onchange event
listbox_name=$(this).attr('id');
2) On clicking >> button just append that selected listbox id to the value with '~' separated and move it to the final listbox
var newOption = new Option(); // Create a new instance of ListItem
newOption.text = Source.options[Source.options.selectedIndex].text;
newOption.value = Source.options[Source.options.selectedIndex].value+'~'+listbox_name;
3) Now select the value from the final listbox(in the right) and at onchange event, separate the value and id with '~' separated
var e = document.getElementById('finallistbox');
var dflSel = e.options[e.selectedIndex].value;
var value=dflSel.indexOf('~');
listbox_name=dflSel.substring(value+1, dflSel.length);
4) On clicking << button just check into which listbox the value should move
if(listbox_name=='leftlistbox1')
MoveItem('finallistbox', 'leftlistbox1');
else if (listbox_name=='leftlistbox2')
MoveItem('finallistbox', 'leftlistbox2');
You can implement the same with 4 list boxes in the left. I also have the implemented HTML, if you require, just share me your personal id.
WebFOCUS 7.7 , 8.0, 8.1
Windows 7
Excel, PDF, HTML