Ok, back on with this...
If you use any of the methods to access the DOM Tree data, all returns will have properties that you can access that relate to the object type you have returned in the function.
img = document.getElementsByName/B; will grab all the elements on the form with a name tag name="thisElement" set. eg...
<img name="thisElement" alt="An Image" src="1.jpg" >
So between getElementsByName and getElementsByClass, I would use the getElementsByName and set up the name in all the elements you want to access or manipulate.
Then you access the properties from results of that function.
So in the case of an image object, all you would do is grab the element, access the properties and make amendments as needed and move on to the next element. The code below roughly summerises the function that gets Data by finding the actual elements you want
function getTheData( str ){
results = [];
x = document.getElementByName(str);
for(res=0; res<x.length; res++){
// do we have a match
if( x[res].name == str){
results.push( x[res] ); // store the object
}
}
return (!x || x.length==0)? false : x; // now return the results or a control
}
so when you call getTheData('resizing'); on your page, assuming that the HTML has neeb sorted out, would return all elements in the DOM tree with a tag element that has a name of 'resizing'.
You then iterate the returned results array and access each objects properties and amend as needed.
Like I pointed out previously, UNLESS your HTML output us fully functioning, no matter what you try script wise, the results could be unpredictable or not return anything or the data may be useless. So you need to have your HTML validated to ensure you have no errors. When the HTML is properly generated, you then concentrate on the JAvaScript side of things.