<SCRIPT LANGUAGE="JavaScript"> function moveOver() { var boxLength = document.myChoices.S2.length; var selectedItem = document.myChoices.S1.selectedIndex; var selectedText = document.myChoices.S1.options[selectedItem].text; var selectedValue = document.myChoices.S1.options[selectedItem].value; var i; var isNew = true; if (boxLength != 0) { for (i = 0; i < boxLength; i++) { thisitem = document.myChoices.S2.options[i].text; if (thisitem == selectedText) { isNew = false; break; } } var strValues = ""; //var boxLength = document.myChoices.S2.length; var count = 0; if (boxLength != 0) { for (i = 0; i < boxLength; i++) { if (count == 0) { strValues = document.myChoices.S2.options[i].value; } else { strValues = strValues + "," + document.myChoices.S2.options[i].value; } count++; } } //{ //alert("Here are the values you've selected:\r\n" + strValues); //} } if (isNew) { newoption = new Option(selectedText, selectedValue, false, false); document.myChoices.S2.options[boxLength] = newoption; } document.myChoices.S1.selectedIndex=-1; } function removeMe() { var boxLength = document.myChoices.S2.length; arrSelected = new Array(); var count = 0; for (i = 0; i < boxLength; i++) { if (document.myChoices.S2.options[i].selected) { arrSelected[count] = document.myChoices.S2.options[i].value; } count++; } var x; for (i = 0; i < boxLength; i++) { for (x = 0; x < arrSelected.length; x++) { if (document.myChoices.S2.options[i].value == arrSelected[x]) { document.myChoices.S2.options[i] = null; } } boxLength = document.myChoices.S2.length; } } </script> <BODY LINK="#0000FF" ALINK="#0000FF" VLINK="#0000FF" ONLOAD="DefPick()" BGCOLOR="#0FFFF"> <FORM name=myChoices method='POST' target='rptWin' onSubmit="return validate(myChoices)"; action='/ibi_apps/WFServlet'> <TABLE width="95%" height="10%" border=0> <tr> <td colspan="1"> <FONT COLOR="BLACK" SIZE=2>[b]Available Sorts[/b]</FONT> <br> <select name="S1" id="S1" style="WIDTH: 220px" size=13 onchange="moveOver();"> <option value='N'>No Sort <option value='A'>Reserve Responsibility Group <option value='B'>Intermediate Summary Group <option value='C'>Corp Code <option value='D'>Business Unit <option value='E'>Market <option value='F'>Carrier <option value='G'>Country Code </select> </td> <td colspan="2"> <FONT COLOR="BLACK" SIZE=2>[b]SortBy:[/b]</FONT> <br> <select multiple name="S2" id="S2" style="width:220;" size="4"> </select> </td>This message has been edited. Last edited by: jbanas6,
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID |
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID |
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID |
<SCRIPT LANGUAGE="JavaScript"> function moveOver() { var boxLength = document.myChoices.S2.length; var selectedItem = document.myChoices.S1.selectedIndex; var selectedText = document.myChoices.S1.options[selectedItem].text; var selectedValue = document.myChoices.S1.options[selectedItem].value; var i; var isNew = true; if (boxLength != 0) { for (i = 0; i < boxLength; i++) { thisitem = document.myChoices.S2.options[i].text; if (thisitem == selectedText) { isNew = false; break; } } var strValues = ""; //var boxLength = document.myChoices.S2.length; var count = 0; if (boxLength != 0) { for (i = 0; i < boxLength; i++) { if (count == 0) { strValues = document.myChoices.S2.options[i].value; } else { strValues = strValues + "," + document.myChoices.S2.options[i].value; } count++; } } //{ //alert("Here are the values you've selected:\r\n" + strValues); //} } if (isNew) { newoption = new Option(selectedText, selectedValue, false, false); document.myChoices.S2.options[boxLength] = newoption; } document.myChoices.S1.selectedIndex=-1; } function removeMe() { var boxLength = document.myChoices.S2.length; arrSelected = new Array(); var count = 0; for (i = 0; i < boxLength; i++) { if (document.myChoices.S2.options[i].selected) { arrSelected[count] = document.myChoices.S2.options[i].value; } count++; } var x; for (i = 0; i < boxLength; i++) { for (x = 0; x < arrSelected.length; x++) { if (document.myChoices.S2.options[i].value == arrSelected[x]) { document.myChoices.S2.options[i] = null; } } boxLength = document.myChoices.S2.length; } } function SelectAll(selObj) { selectObject = eval('document.forms[0].' + selObj); for(i=0; i<selectObject.length; i++) selectObject.options[i].selected = true; } </script> <BODY LINK="#0000FF" ALINK="#0000FF" VLINK="#0000FF" ONLOAD="/* DefPick() */" BGCOLOR="#0FFFF"> <FORM name=myChoices method='POST' target='rptWin' onSubmit="/* return validate(myChoices) */; SelectAll('S2');"; action='/ibi_apps/WFServlet'> <input type="hidden" name="IBIF_ex" value="fmfp100"> <TABLE width="95%" height="10%" border=0> <tr> <td colspan="1"> <FONT COLOR="BLACK" SIZE=2>[b]Available Sorts[/b]</FONT> <br> <select name="S1" id="S1" style="WIDTH: 220px" size=13 onchange="moveOver();"> <option value='N'>No Sort <option value='A'>Reserve Responsibility Group <option value='B'>Intermediate Summary Group <option value='C'>Corp Code <option value='D'>Business Unit <option value='E'>Market <option value='F'>Carrier <option value='G'>Country Code </select> </td> <td colspan="2"> <FONT COLOR="BLACK" SIZE=2>[b]SortBy:[/b]</FONT> <br> <select multiple name="S2" id="S2" style="width:220;" size="4"> </select> </td> <input type="submit" value="Submit" onClick=""> </form> </body> </html>