I have an HTA in which I must update the innerHTML
of a set of elements with the class driveLetter
. Before I do this I must obviously grab an array of all elements with this class.
I've tried doing this with JS, however I'm told via an error that both of the methods below are not supported (Tested with IE9 and IE11). Using these functions within an HTML file works, but this is an HTA.
var driveLetterInstances = document.getElementsByClassName("driveLetter");
var driveLetterInstances = document.querySelectorAll(".driveLetter");
The errors generated by lines above -
Object doesn't support property or method 'getElementsByClassName'
Object doesn't support property or method 'querySelectorAll'
I don't specifically have to use JS and would be open to using VBS to carry out this function, but I have no clue on how to start with that (or even if it's possible).