za****@hotmail.com (Zarkas) writes:
Hi' there
Could someone tell me how to access the links for part of my page?
(between a div tag)
Like document.links but only for a part of the document..
Not exactly like it (document.links also contain area elements), but
close:
var myDiv = document.getElementById("divId");
var divLinks = myDiv.getElementsByTagName("a");
You should check that the elements of the collection in divLinks have
a href. It collects all a-elements, also those without href attributes,
where document.links only contain the ones with an href attribute.
/L
--
Lasse Reichstein Nielsen -
lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'