Can't use object properties' values
Posted: Tue Aug 08, 2006 3:53 am
Hi.
I'm succesfully fetching an img element by it's ID, but I can't any of the properties' values, not even the id property.
I tried it both in Firefox and IE6 but to no avail.
Please help me solve this issue.
The fetching works, but again, I can't get any of the properties' values so the alert function isn't functioning. What's even more weird, I tried the following code and it worked:
All of the properties' names were printed out. I think I am going crazy. Why can't I get the properties values?
I'm succesfully fetching an img element by it's ID, but I can't any of the properties' values, not even the id property.
I tried it both in Firefox and IE6 but to no avail.
Please help me solve this issue.
Code: Select all
// fetch_object emulates document.getElementById
// and bridges over browser compatibility (it works, the problem is not here)
var buttonIcon = fetch_object(obj.id + '_icon');
alert(buttonIcon.id);Code: Select all
for (property in buttonIcon)
{
alert(proprty + "<br>");
}