I have a simple script where I set a background image for a <TD>
<td id="td1" style="background-image:url(images/tasd.png); width:171px; height:32px; background-repeat:no-repeat" class="title"><a onClick="javascript:changebg('td1');">Click Me </a></td>
I wrote a simple script to change the background of this td when I pass the ID, BUT IT DOESNT WORK IN IE!
This works in FF but not in IE! Is it possible to make this work in IE? Thank you!
<td id="td1" style="background-image:url(images/tasd.png); width:171px; height:32px; background-repeat:no-repeat" class="title"><a onClick="javascript:changebg('td1');">Click Me </a></td>
I wrote a simple script to change the background of this td when I pass the ID, BUT IT DOESNT WORK IN IE!
Code:
function changebg(x)
{
var newImage = 'url(images/tasd_over.png)';
document.getElementById(x).style.backgroundImage = newImage;
document.getElementById(x).style.width = '171px';
document.getElementById(x).style.height = '32px';
}
This works in FF but not in IE! Is it possible to make this work in IE? Thank you!