K
kantix
Hi,
I have problem in my script. My function takes images and puts
colored border on them depending on if they are selected or mouse is
on them. But on FF when I load page and move my mouse over those
pictures (at the same time) I get an error:
document.getElementById(this.id) has no properties. Here I put a piece
of my code where error happens. (If you need more - tell me).
newtd.onmouseover = function() {
if (document.getElementById(this.id).className=='onclick') {
document.getElementById(this.id).className='onclick'
}
else if (document.getElementById(this.id).className=='offtd') {
document.getElementById(this.id).className='ontd'
}
}
I add those pictures and all table dynamically using appendChild().
Looks like there is no errors on IE and Opera.
Maybe someone know why is this happening and how to aviod it?
Thanks!
I have problem in my script. My function takes images and puts
colored border on them depending on if they are selected or mouse is
on them. But on FF when I load page and move my mouse over those
pictures (at the same time) I get an error:
document.getElementById(this.id) has no properties. Here I put a piece
of my code where error happens. (If you need more - tell me).
newtd.onmouseover = function() {
if (document.getElementById(this.id).className=='onclick') {
document.getElementById(this.id).className='onclick'
}
else if (document.getElementById(this.id).className=='offtd') {
document.getElementById(this.id).className='ontd'
}
}
I add those pictures and all table dynamically using appendChild().
Looks like there is no errors on IE and Opera.
Maybe someone know why is this happening and how to aviod it?
Thanks!