<p class="typeA build1"> Build 1 <div class="b">Complete</div></p>
<p class="typeA build2"> Build 2 <div class="b">Incomplete</div></p>
//about 6 or 7 more builds...
I need to access the style of build# to change the display...all are originally hidden but I hava java code that creates a string/s (ex. "build2" and "build3"). I have that string saved as "tempKey" in my JAVA code.
Then in a javascript script:
var tempKey = "<%=tempKey%>";
document.getElementsByClassName(tempKey).style.display = "block !important";
I have also tried adding a class "active" and had that class have the same style (block !important), plus a number of different ways to solve this. It seems I just can't access the element right using the java string in a javascript function.
EDIT:
I am accessing the right element, but it won't let me overwrite the display style from none to block. For some reason !important is not working...