Using the Webform module in Drupal has its perks, but it automatically writes all the ids and classes which can be frustrating when trying to add your own. Unfortunately, sometimes the element you need doesn't have an id or class "a" that's nestled inside a "legend" with a class but no id within a fieldset with an id.
Even though getElementById('myid') works fine, accessing this specific element is proving to be a challenge. Many attempts using code like:
document.getElementById('webform-created-id-here').getElementsByTagName('legend').getElementsByTagName('a');
have been unsuccessful so far, leaving me feeling lost in my understanding of DOM navigation. Any advice or suggestions would be greatly appreciated!
Thank you for your help!