Hallo,
wie kann ich mittels "function" doppelte Namen entfernen? In der Dropdownliste sollte dann nur das Wort einmal vorkommen. Danke im vorraus.
function generateMenu(formObjname, onChangeStr, firstMenuLine) {
if (window.profiles) {
var menuArray = buildArrayfromIndex();
MenuOptionsArray1 = new Array(firstMenuLine+"|")
MenuOptionsArray2 = MenuOptionsArray1.concat(menuArray)
optStr = "";
for (i=0; i<MenuOptionsArray2.length; i++) {
divide = MenuOptionsArray2[i].split("|");
optStr += "<option value="" + divide[0] + "">" + divide[0] + "</option>";
}
return "<select name=""+ formObjname +"" onChange="" + onChangeStr + ";">" + optStr + "</select>";
} else {
return "";
}
}
function buildArrayfromIndex() {
tmpArray = new Array();
filterList = new Array();
for (x=0; x < profiles.length; x++) {
divide = profiles[x].split("|");
filteredPg = false;
for (y=0; y<filterList.length; y++) {
if (filterList[y].toUpperCase() == divide[0].toUpperCase()) {
filteredPg = true;
break;
}
}
// Filter setzen für die Auswahlsuche
tmpArray[tmpArray.length] = divide[0] + "|" + divide[1] + "|" + divide[3] + "|" + divide[4]+ "|" + divide[5]+ "|" + divide[6];
}
tmpArray.sort();
return tmpArray;
}
function goPage(menuNm) {
if (menuNm.options[menuNm.selectedIndex].value != "0") {
location.href = menuNm.options[menuNm.selectedIndex].value;
}
}