Thanks to this question, I learned how I can dynamically create HTML elements based on a user's selected option.
Now, when users select an option of, say, 5, five input field groups are created and shown.
For each input field group, there exists a file upload button for images.
I have a javascript function that detects when users upload an image and then displays a thumbnail of that image.
The problem is that I need to access the ID of each <input type="file" id="appraisal_image1">
I could, of course, create multiple function definitions, each with different ID's, and then call each of those functions, but I was wondering if there was accomplish this without copying & pasting so much code.