worked! great thank you...you just saved me a lot of time...
another question...
using this same code is there anyway to make sure that my links are not repeated?
Code:
var randomlinks = [
'<a href="[site]" target="_blank"><img alt="..." src="[img]" style="border: 1px solid #BCBCBC" width="200" height="150"></a>',
'<a href="[site]" target="_blank"><img alt="..." src="[img]" style="border: 1px solid #BCBCBC" width="200" height="150"></a>',
'<a href="[site]" target="_blank"><img alt="..." src="[img]" style="border: 1px solid #BCBCBC" width="200" height="150"></a>',
'<a href="[site]" target="_blank"><img alt="..." src="[img]" style="border: 1px solid #BCBCBC" width="200" height="150"></a>'
];
function randomlink(){
var add = randomlinks[Math.floor(Math.random()*randomlinks.length)]
return(add)
}
this is the code embedded in the html file...
Code:
<tr>
<td><script>document.write( randomlink() );</script></td>
<td><script>document.write( randomlink() );</script></td>
<td><script>document.write( randomlink() );</script></td>
<td><script>document.write( randomlink() );</script></td>
</tr>
Bookmarks