Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] child nodes and the such


  • From: javascript@xxxxxxxxxx (Golden Troll)
  • Subject: [Javascript] child nodes and the such
  • Date: Sat, 29 Dec 2001 21:49:57 -0800

I'm trying to write a function to add title tool tips to each of my
images that are linked to bigger images I've tried the following
function and it doesn't seem to work
//
function getImages(){
// var theLink = document.getElementsByTagName("a");
	for (var i = 0; i <= document.getElementsByTagName("a").length; i++) {
//		if (document.getElementsByTagName("a")[i].childNodes){
			if ( document.getElementsByTagName("a")[i].childNodes[0].nodeName =
"IMG"){
					document.getElementsByTagName("a")[i].childNodes[0].title = "Click
to Enlarge";

			}
//		}
	}
getImages()
}
I need this to work in NN6 and IE5+ Can y'all help?
BTW did you know Opera6 is W3C DOM compliant?
Peace and Respects,
Scott Gahres
 hemp@xxxxxxxxxxxxxxx  http://goldentroll.com