Ways of comparing Text Content between HTML Elements
<p>As the title says, I am looking for a way of comparing the Text content of an HTML Element with another HTML Elements's Text content and only if they are identical, alert a message. Any thoughts? Greatly appreciate it!
(Posted with code): For example, I can't equalize the remItem's content with headElms[u]'s content.</p>

<pre><code>else if (obj.type == 'checkbox' &amp;&amp; obj.checked == false) {
    var subPal = document.getElementById('submissionPanel');
    var remItem = obj.parentNode.parentNode.childNodes[1].textContent;
    alert("You have disselected "+remItem);

    for (var j=0; j &lt; checkSum.length; j++) {
        if (remItem == checkSum[j]) {
            alert("System found a match: "+checkSum[j]+" and deleted it!");
            checkSum.splice(j,1);
        } else {
            //alert("There were no matches in the search!");
        }
    }
    alert("Next are...");
    alert("This is the checkSum: "+checkSum);
    alert("Worked!!!");

    var headElms = subPal.getElementsByTagName('h3');
    alert("We found "+headElms.length+" elements!");

    for (var u=0; u &lt; headElms.length; u++){
        alert("YES!!");
        if (remItem == headElms[u].textContent) {
            alert("System found a matching element "+headElms[u].textContent+" and deleted it!");
        }
        else {
            alert("NO!!");
            alert("This didn't work!");
        }
    }

}
</code></pre>
