Hi, I was wondering if anyone could help me with my javascript problem On a website I have breadcrumbs, for example: home>electronics>netbooks I need to be able to only pull the second name- electronics - This is what i have so far: <div id="breadcrumbs"> <a href="#1">Home</a> > <a href="#2">Laptops</a> > <a href="#3">Netbooks</a> </div> <script type="text/javascript"> var mylist=document.getElementById("breadcrumbs") var i; for (i=1; i<mylist.childNodes.length; i++) { alert(mylist.childNodes); } </script> But this alerts me with the name of the link, then an object and repeats. Does anyone know how to get the link out and just have the alert read "Home" "Electronics" "Netbook" More specifically, just Electronics... Thanks!
use mylist.childNodes.innerHTML this will give you "Home" "Electronics" "Netbook". innerHTML gives text written in any html tag. Sheetal