I am creating an array wherein I am (succesfully) grabbing all child
images based on a parent node and source file name:

var cimage = globals.ref.parent().find('img[src*=blue]:not(:first)')
globals.childImg = cimage;

There are 8 items coming back in the array (there are 8 images).  I
want to be able to see the values of each item in the array, but I am
having difficulty showing the src attribute of each item.  I was able
to succesfully get the objects to list using the below...

for (i=0;i<globals.childImg.length;i++) {
        document.write(globals.childImg[i] + "<br >");
}

...but I haven't been able to get a listing of the src attributes
within those objects.  I've tried:

for (i=0;i<globals.childImg.length;i++) {
        document.write(globals.childImg[i].attr + "<br >");
}

...which comes back as 8 undefined objects, and...

for (i=0;i<globals.childImg.length;i++) {
        document.write(globals.childImg[i].attr('src') + "<br >");
}

Eventually, I want to be able to run an evaluation against the src
values, but am I missing something obvious about being able to get an
array of attributes?

Gil

Reply via email to