I'm trying to extract some information from the various DIV to include a title in the document.title.
The code is a legacy code for which for the purpose of this test I have simplified. This legacy code is replicated in hundreds of HTMLs. For this reason, I'm trying to extract the information from the various DIV with some DHTML instructions without success.
The DIV has an ID for which I can reference no problem. The info I would like to extract is found inside this DIV and I would assume is called a child of this DIV. When I display the length of this childNodes it returns 0 when I do expect it to have childs.
Each Div has a <title> tag. This is the info I would like to extract.
Here's the code in question:
alert("length = " + document.getElementById("SectionD").childNodes.length);
alert("Value = " + document.getElementById("SectionD").childNodes.item(0).nodeValue);
=================================
The Div in Question:
<!-- section divider -->
<div class='billSection' id='SectionD'><html>
<head>
<title>Summary</title>
</head>
</html>
</div>
Thanks for your help.
Bookmarks