...as I was saying:
theForm.state.className = 'hiddenField'; - this sets the class of the input field state to "hiddenField" and so it gets hidden due a css selector. Ok.
theForm.state.setAttribute('className', 'hiddenField'); - this creates a new attribute: className ="hiddenField". Why?
The only thing I can find about this attribute is something to do with React.
Similarly for the label:
document.getElementById("stateLabel").className = 'hiddenField';
document.getElementById("stateLabel").setAttribute('className', 'hiddenField');
Bookmarks