Okay I bet this is the easiest thing to figure out, but I've tried EVERYTHING to no avail. Maybe it's just not possible but I don't see why not.
I have a php page which is grabbing content from mysql and looping with while to display it. Each entry has a unique id, which I am setting as the name (the id is already taken in my script).
I then have this code:
So I can see the name alerted to me. This yields undefined. 'holder0' exists and has a name.
Am I missing something? Why can't I get the elements name with getelbyid?
Thanks in advance.
I have a php page which is grabbing content from mysql and looping with while to display it. Each entry has a unique id, which I am setting as the name (the id is already taken in my script).
I then have this code:
Code:
window.onload = function() {
alert(document.getElementById('holder0').name);
}
Am I missing something? Why can't I get the elements name with getelbyid?
Thanks in advance.
Comment