jasongr
01-25-2005, 11:13 AM
Hello
I have the following table definition:
<table border="0">
<tr>
<td id="test" style="background-image: url('one.gif');">hello</td>
</tr>
</table>
I would like to change the background image of that cell in runtime via JavaScript on Firefox 1.0. I tried the following but it didn't work
var obj = document.getElementById("test");
obj.style.backgroundImage = 'two.gif';
can anyone tell me what I am doing wrong, and how to fix it?
regards
I have the following table definition:
<table border="0">
<tr>
<td id="test" style="background-image: url('one.gif');">hello</td>
</tr>
</table>
I would like to change the background image of that cell in runtime via JavaScript on Firefox 1.0. I tried the following but it didn't work
var obj = document.getElementById("test");
obj.style.backgroundImage = 'two.gif';
can anyone tell me what I am doing wrong, and how to fix it?
regards