Hi,
I am trying to get a random image as a background to a cell, and have tried many ideas but none work, in desperate need for help can anybody please.
I have this in the header
<script language="javascript" type="text/javascript">
var img_rnd = new Array ();
img_rnd[0] = "hp-1.jpg";
img_rnd[1] = "hp-2.jpg";
img_rnd[2] = "hp-3.jpg";
img_rnd[3] = "hp-4.jpg";
img_rnd[4] = "hp-5.jpg";
img_rnd[5] = "hp-6.jpg";
var i = Math.floor(Math.random() * 6);
document.getElementById("hp-random").style.backgroundImage="url("+img_rnd[i]+")";
//-->
</script>
and this on the cell
<td colspan="2" id="hp-random" height="395">