1) Script Title: Random Iframe Content
2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...ndomiframe.htm
3) Describe problem:
I used this script and would like to make my random content (images) linkable. Script is below and help is much appreciated. Thanks!
<table cellpadding=0 cellspacing=0 width="100%" bgcolor=#fed500 style="border-top:1px groove #fed500"><td width=100% height="22px" class=whitefont align=center><b>Chick of the Day</b></td></table>
<div align=center style="margin-top:5px;"><table width=146px height=220px><td width=100% align=center valign=center><a href="#" style="display:block;width:100%;height:100%;text-decoration:none;">
<script language="JavaScript1.2">
//Random iframe content- © Dynamic Drive (www.dynamicdrive.com)
//For full source code, and Terms Of use, visit http://dynamicdrive.com
//This credit MUST stay intact for use
var ie=document.all&&navigator.userAgent.indexOf("Opera")==-1
var dom=document.getElementById&&navigator.userAgent.indexOf("Opera")==-1
//Specify IFRAME display attributes
var iframeprops='width=146 height=220 bgcolor=#003366 marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"'
var openup='<a href="#">'
var closeup='</a>'
//Specify random URLs to display inside iframe
var randomcontent=new Array()
randomcontent[0]="http://www.virtualbluelot.com/Images/cod/1chick.jpg"
randomcontent[1]="http://www.virtualbluelot.com/Images/cod/2chick.jpg"
randomcontent[2]="http://www.virtualbluelot.com/Images/cod/3chick.jpg"
randomcontent[3]="http://www.virtualbluelot.com/Images/cod/4chick.jpg"
randomcontent[4]="http://www.virtualbluelot.com/Images/cod/5chick.jpg"
randomcontent[5]="http://www.virtualbluelot.com/Images/cod/6chick.jpg"
randomcontent[6]="http://www.virtualbluelot.com/Images/cod/7chick.jpg"
randomcontent[7]="http://www.virtualbluelot.com/Images/cod/8chick.jpg"
randomcontent[8]="http://www.virtualbluelot.com/Images/cod/9chick.jpg"
//No need to edit after here
if (ie||dom)
document.write('<iframe id="dynstuff" src="" '+iframeprops+'></iframe>')
function random_iframe(){
if (ie||dom){
var iframeobj=document.getElementById? document.getElementById("dynstuff") : document.all.dynstuff
iframeobj.src=randomcontent[Math.floor(Math.random()*randomcontent.length)]
}
}
window.onload=random_iframe
</script>
</a></td></table></div>



Reply With Quote

Bookmarks