Tutorial – Ninox – Elementor Dropdown

				
					<select id="myDropdown" name="myDropdown">
</select>
<script>
// Info was zu tuen ist 
// Zeile 30 richtiges Element auswählen
// Zeile 34 'Leistung' in Name der Tabellenspalte ändern.
// myUrl Die freigegebene Ninox URL eintragen
// Um mehr Information zu erhalten ' '+ myElement[i].Leistung + einfügen 

var myUrl = 'https://share.ninox.com/uw3g5b4g5b6uu01hksmoapgtby4yu9krkmx5'
    window.onload = populateSelect();

    function populateSelect() {
        

        // CREATE AN XMLHttpRequest OBJECT, WITH GET METHOD.
        var xhr = new XMLHttpRequest(), 
            method = 'GET',
            overrideMimeType = 'application/json',
            url = myUrl;        // ADD THE URL OF THE FILE.
            
            

        xhr.onreadystatechange = function () {
            if (xhr.readyState === XMLHttpRequest.DONE && xhr.status === 200) {
                
                // PARSE JSON DATA.
                var myElement = JSON.parse(xhr.responseText);

                var ele = document.getElementById('myDropdown');
                for (var i = 0; i < myElement.length; i++) {
                    // BIND DATA TO <select> ELEMENT.
                    ele.innerHTML = ele.innerHTML +
                        '<option value="' + myElement[i].Id + '">' + myElement[i].Leistung +  '</option>';
                }
            }
        };
        xhr.open(method, url, true);
        xhr.send();
    }

   
</script>