Last active
February 20, 2019 18:58
-
-
Save rrakso/c4479a228d5e6bbf546acd406cacec8b to your computer and use it in GitHub Desktop.
Skrypcik generujący JSONa z listy pracowników WE ZUT i przekazujący wynik do generatora zaproszeń
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function generujJSON(nazwaIDlisty) { | |
var listaArr = []; | |
var listaOsoby = ['','']; | |
var lista = document.getElementById(nazwaIDlisty).children[0].children; | |
for (var i = 0; i < lista.length; i++) { | |
var osoba = lista[i].innerText.split(",")[0]; | |
listaOsoby = ['m', osoba]; | |
listaArr.push(listaOsoby); | |
} | |
var jsonWykladowcy = JSON.stringify(listaArr); | |
window.open(`https://octawave.com.pl/oskar/zwarcie/generujZaproszenia.php?wykladowcy=${jsonWykladowcy}`); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment