I am facing a challenge in combining drag and drop listeners into one function to create dynamic zones with the same class. This will allow me to call a single function for uploading files. The upload function is currently working correctly, but I need assistance in making this process more dynamic within a single function.
<div id="dropZone1" class="dropZones" ></div>
<div id="dropZone2" class="dropZones" ></div>
<script>
var dropMedical = document.getElementById('dropZone1');
dropMedical.addEventListener('dragover', dragOver, false);
dropMedical.addEventListener('drop', fileSelect, false);
var dropStatements = document.getElementById('dropZone2');
dropStatements.addEventListener('dragover', dragOver, false);
dropStatements.addEventListener('drop', fileSelect, false);
</script>