Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function populate() {
- var seria = document.getElementById("seria");
- var wartosc = seria.options[seria.selectedIndex].value;
- var zadanie = document.getElementById("zadanie");
- while (zadanie.firstChild) {
- zadanie.removeChild(zadanie.firstChild); }
- var nazwy;
- if (wartosc == "Wektory") {
- nazwy = ["Departures", "Fraction", "Intersection"]; }
- else if (wartosc == "Lancuchy") {
- nazwy = ["Colloquium", "Initials", "Sort"]; }
- else if (wartosc == "Algorytmy") {
- nazwy = ["Duplicates", "Find"]; }
- else if (wartosc == "Klasy") {
- nazwy = ["Bottle", "Lights", "Set", "Triangle"]; }
- else if (wartosc == "Operatory") {
- nazwy = ["Add", "Geometric"]; }
- else if (wartosc == "Metody") {
- nazwy = ["Histogram", "Object"]; }
- else if (wartosc == "Kolokwium") {
- nazwy = ["K11", "K12", "K13", "K14"]; }
- var opcja = document.createElement("option");
- opcja.value = "";
- opcja.innerHTML = "";
- zadanie.appendChild(opcja);
- for (var index = 0; index < nazwy.length; index++) {
- var opcja = document.createElement("option");
- opcja.value = nazwy[index];
- opcja.innerHTML = nazwy[index];
- zadanie.appendChild(opcja); }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement