View Full Version : Document Element Call For IE6 Wrong?

04-12-2005, 11:04 PM
is there any reason at all that this javascript would refuse to set the src to the new object in IE6? It works fine in Firefox and NS.

function updateImage(theitemid, theitemproc){
var ms;
Today = new Date();
ms = Today.getUTCMilliseconds();
document.getElementById("avatar_image").src= newimg;
}else if(document.all&&!document.getElementById){
document.all.avatar_image.src= newimg;

04-13-2005, 01:16 AM
Just doesn't make sense to me. I've tried using all different types of square brackets and single quotes, double quotes and everything, but nothing seems to help in IE

04-13-2005, 01:35 AM
Works for me... what are you getting for ("avatar_image").src?

04-13-2005, 02:46 AM
Well, it did start working for me all of a sudden - i have no idea why. maybe the previous page didn't go out of the cache when i told it to or what lol. However, I discovered the setting the image source in this way causes the image output to have a solid black background, which is unacceptable for my application lol. I need to convert the images back to white background, or preferably, transparent before sending it back to disk. IE not supporting png transparency is ridiculous. i did get some JS that makes a png transparent after the page loads in IE, but this really doesn't look good. I'm dealing with it, but now that I am passing this value through a php like this, it comes back out, and the png transparency script doesn't recognize it since it's not "really" a png according to the html.