I've been to many different site forums and have yet to have my questions answered completely.. maybe your site and members is the one who can do it - I sure HOPE SO! : )
http://newpw.delphi-ts.net/test/testydude3.aspx
^^ Here is a page - everything is working as I want, EXCEPT, I want to make each one of these random images clickable to a specific url...
Can anyone at this forum do this? It would be great if you knew. Also - if you know how to add a matching quote for each image right underneath it, that would be awesome, but having the clickable image is more important right now - thank you all in advance! Am hoping you guys and gals are smarter than the other forums out there!
Here is the code:
<style type='text/css'>
td.titlea {
height: 174px;
width: 160px;
padding: 0px;
border: 1px solid #eeeeee;
vertical-align: bottom;
margin-right:2px;
}
td.titleb {
height: 174px;
width: 160px;
border: 1px solid #eeeeee;
vertical-align: bottom;
margin-right:2px;
}
td.titlec {
height: 174px;
width: 160px;
border:1px solid #eeeeee;
vertical-align: bottom;
margin-right:2px;
}
td.titled {
height: 174px;
width: 160px;
border: 1px solid #eeeeee;
vertical-align: bottom;
margin-right:2px;
}
</style>
<script language="JavaScript" type="text/javascript"><!--
var image = new Array();
image[0] = 'https://www.kqimageserver.com/pwimages/new/testimages/random1.jpg' ;
image[1] = 'https://www.kqimageserver.com/pwimages/new/testimages/random2.jpg' ;
image[2] = 'https://www.kqimageserver.com/pwimages/new/testimages/random3.jpg' ;
image[3] = 'https://www.kqimageserver.com/pwimages/new/testimages/random4.jpg' ;
image[4] = 'https://www.kqimageserver.com/pwimages/new/testimages/random5.jpg' ;
image[5] = 'https://www.kqimageserver.com/pwimages/new/testimages/random6.jpg' ;
image[6] = 'https://www.kqimageserver.com/pwimages/new/testimages/random.jpg' ;
image[7] = 'https://www.kqimageserver.com/pwimages/new/testimages/random7.jpg' ;
image[8] = 'https://www.kqimageserver.com/pwimages/new/testimages/random8.jpg' ;
image[9] = 'https://www.kqimageserver.com/pwimages/new/testimages/random9.jpg' ;
image[10] = 'https://www.kqimageserver.com/pwimages/new/testimages/random10.jpg' ;
var index = Math.floor(Math.random() * (image.length - 1)) + 1;
indexb = Math.floor(Math.random() * image.length);
while (indexb == index)
{
indexb = Math.floor(Math.random() * image.length);
}
indexc = Math.floor(Math.random() * image.length);
while (indexc == index || indexc == indexb)
{
indexc = Math.floor(Math.random() * image.length);
}
indexd = Math.floor(Math.random() * image.length);
while (indexd == index || indexd == indexb || indexd == indexc)
{
indexd = Math.floor(Math.random() * image.length);
}
document.write('<style type="text/css"> td.titlea { background-image: url('+ image[index] +') } </style>');
document.write('<style type="text/css"> td.titleb { background-image: url('+ image[indexb] +') } </style>');
document.write('<style type="text/css"> td.titlec { background-image: url('+ image[indexc] +') } </style>');
document.write('<style type="text/css"> td.titled { background-image: url('+ image[indexd] +') } </style>');
//-->
</script>
<br /><br />
<div style="width:650px; margin-left:9px";><p class="page_title">random image test</p>
<table width='630' cellpadding='0' cellspacing='0' bgcolor="#ffffff" align="left" style="margin-left:6px;">
<tr>
<td class='titlea' style="width:157px"></td>
<td class='titleb' style="width:157px"></td>
<td class='titlec' style="width:157px"></td>
<td class='titled' style="width:157px"></td></tr>
</table>
</div>
If its a new array for links (or captions/quotations), please show me exactly how it looks and where it goes in reference to this code if you'd be so kind. Thanks, hope someone can help me with this!




Reply With Quote

)

Bookmarks