Last active
August 11, 2019 15:38
-
-
Save mrbusche/02683a0174d11f070e14f45efcfbc0b9 to your computer and use it in GitHub Desktop.
MFL searching
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
//option 1 | |
var names = ['Michael, Christine','Allen, Buck','Breida, Matt','Sanu, Mohamed','Ross, John','Gore, Frank']; | |
function loopNames(names) { | |
for (var name = 0; name < names.length; name++) { | |
(function (name) { | |
setTimeout(function () { | |
document.getElementById('add_filt_name').value = names[name]; | |
picker_filter('add'); | |
console.log(document.getElementById('add').getElementsByTagName('tbody').length > 0 ? names[name] : ''); | |
}, 50 * name); | |
})(name); | |
}; | |
} | |
loopNames(names); | |
//option 2 | |
var names = ['Michael, Christine','Allen, Buck','Breida, Matt','Sanu, Mohamed','Ross, John','Gore, Frank']; | |
names.forEach(function(element) { | |
document.getElementById('add_filt_name').value = element; | |
picker_filter('add'); | |
console.log(document.getElementById('add').getElementsByTagName('tbody').length > 0 ? element : ''); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment