MrCraig
23-12-2008, 04:11 PM
Hey,
Im wanting to change the background image of a cell with javascript and have got
function c_change(colour)
{
document.getElementById("c_bar").style.background = 'c_change/' + colour + '_bar.png';
}
However, this gives me an error.
If i replace the property to a hex code, it works, just doesnt seem to for images.
Any idea how i could get this to work changing bg images?
Thanks :)
Im wanting to change the background image of a cell with javascript and have got
function c_change(colour)
{
document.getElementById("c_bar").style.background = 'c_change/' + colour + '_bar.png';
}
However, this gives me an error.
If i replace the property to a hex code, it works, just doesnt seem to for images.
Any idea how i could get this to work changing bg images?
Thanks :)