1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3 (c) 2005 U.S. Robotics Corporation
9 <link href="usr_main.css" rel="stylesheet" type="text/css">
10 <link href="usr_menus.css" rel="stylesheet" type="text/css"><script src="usr_menus.js" type="text/javascript"></script><script src="usr_menus_build.js" type="text/javascript"></script>
11 <script src="usr_common.js" type="text/javascript"></script>
13 <meta HTTP-EQUIV='Pragma' CONTENT='no-cache'>
15 <script type="text/javascript" src="portName.js"></script>
16 <script type="text/javascript">
18 setPageTitle("<%ejGetWlJS(wlInterface)%>");
20 function btnRemove() {
21 with ( document.choiceForm ) {
22 var arrSelected = new Array();
24 for ( i = 0; i < lstChoice.options.length; i++ ) {
25 if ( lstChoice.options[i].selected == true ) {
26 arrSelected[count] = lstChoice.options[i].value;
31 for (i = 0; i < lstChoice.options.length; i++) {
32 for (x = 0; x < arrSelected.length; x++) {
33 if (lstChoice.options[i].value == arrSelected[x]) {
34 varOpt = new Option(lstChoice.options[i].text, lstChoice.options[i].value);
35 lstAvailable.options[lstAvailable.length] = varOpt;
36 lstChoice.options[i] = null;
44 with ( document.choiceForm ) {
45 var arrSelected = new Array();
47 for ( i = 0; i < lstAvailable.options.length; i++ ) {
48 if ( lstAvailable.options[i].selected == true ) {
49 arrSelected[count] = lstAvailable.options[i].value;
54 for (i = 0; i < lstAvailable.options.length; i++) {
55 for (x = 0; x < arrSelected.length; x++) {
56 if (lstAvailable.options[i].value == arrSelected[x]) {
57 varOpt = new Option(lstAvailable.options[i].text, lstAvailable.options[i].value);
58 lstChoice.options[lstChoice.length] = varOpt;
59 lstAvailable.options[i] = null;
67 var loc = 'portmapcfg.cmd?action=add';
68 with ( document.forms[0] ) {
71 if (groupName.value == '') {
72 alert('Need to provide a valid Group Name "A non empty string of characters."');
75 if (lstChoice.length == 0) {
76 alert('Need to provide at least one interface "Select one from the Available list."');
79 loc += '&groupName=' + groupName.value;
82 for (i = 0; i < lstChoice.length; i++) {
83 tempList += lstChoice.options[i].value + '|';
85 var interfaces = tempList.split('|');
87 for (i = 0; i < interfaces.length; i++ ) {
88 ifc += interfaces[i] + '|';
90 loc += '&choiceBox=' + ifc;
92 var code = 'location = "' + loc + '"';
99 <body onload="initMenu();">
101 <script type="text/javascript">
102 writeHeader("Port Mapping");
105 <form name="choiceForm">
108 <p>To create a new mapping group:</p>
111 <li>Enter the group name and select interfaces from the
112 <b>Available interfaces</b> list and add them to the <b>Grouped interfaces</b> list
113 using the arrow buttons to create the required mapping of the ports.
114 The group name must be unique.</li>
116 <li>Press <b>Save</b> button to make the changes effective.</li>
119 <p><b>Note:</b> The selected interfaces will be removed from their
120 existing groups and added to the new group.</p>
122 <p><label for="groupName">Group name:</label> <input type="text" name="groupName" id="groupName" size="30" maxlength="32"></p>
124 <table border="0" cellpadding="0" cellspacing="0">
126 <td><label for="">Available interfaces:</label></td>
128 <td><label for="">Grouped interfaces:</label></td>
132 <select multiple name="lstAvailable" id="lstAvailable" size="10">
133 <script type="text/javascript">
138 var brdId = '<%ejGetJS(boardID)%>';
139 var interfaceInfo = '<%ejGetOther(bridgeInterfaceInfo, all)%>';
140 var interfaces = interfaceInfo.split('|');
142 for ( i = 0; i < interfaces.length; i++ ) {
143 if (interfaces[i] != '') {
144 document.write(" <option value='" + interfaces[i] + "'>");
146 dispName = getUNameByLName(brdId + '|' + interfaces[i]);
147 document.writeln(dispName);
155 <table border="0" cellpadding="0" cellspacing="5">
157 <td><input type="button" value=" -> " onClick="btnAdd()"></td>
160 <td><input type="button" value=" <- " onClick="btnRemove()"></td>
165 <select multiple name="lstChoice" id="lstChoice" size="10"></select>
169 <p><input type='button' onClick='btnApply()' value="Save"></p>
172 <script type="text/javascript">