Hello,
how can javascript access the contents of a div so their properties can be changed?
For example acessing the list of tags within a div tag like:
<div id="flist">
<a href="#" onClick="dot(flist)">stuff</a>
</div>
<div id="olist">
<a href="#" onClick="dot(olist)">stuff</a>
</div>
Here's the current code that doesn't work
function dot(container_id) {
var container = document.getElementById (container_id);
var list = document.getElementById (container_id).childNodes;
}
Errors:
Warning: Non-standard Global Element reference was used. Use W3C standard document.getElementById() instead.
Error: document.getElementById(container_id) has no properties
Line: 8
Thanks for you rcomments.