Welcome Guest [Log In] [Register]
This board has been archived and is no longer accepting new questions. If you have a support question for your ZetaBoard, please visit us at the new support board. Registration is free and easy.


Visit the NEW ZetaBoards Support forum!

Username:   Password:
Add Reply
Random Affiliate
Topic Started: Mar 14 2008, 01:06 PM (399 Views)
Trav
Member
[ * ]
Thsi is from someone elses code, but I've been trying to make it so it shows an iframe of the random link. Any idea what I'm doing wrong?
And btw I was putting this in a Website (like from the Website Maker tool)

Code:
 
<script type="text/javascript">
//<![CDATA[
ads=[];n=0
ads[n+]=["http://google.com/"];
ads[n+]=["http://google.ca"];
num=Math.floor(Math.random()*ads.length);
document.write("<center>Random Ad<br><iframe src='"+ads+"' width="100%" height="100%" ></iframe></center>");
//]]>
</script>
Offline Profile Quote Post Goto Top
 
Viral
Member Avatar
i'm stanley nao
[ *  *  *  *  * ]
Code: HTML
 
<script type="text/javascript">
//<![CDATA[
ads=[];n=0
ads[n+]=["http://google.com/","url"];
ads[n+]=["http://google.ca","image"];
var num=Math.floor(Math.random()*ads.length);
document.write("<center><a href='"+ads[num][0]+"'><img src='"+ads[num][1]+"'/></a></center>");
//]]>
</script>
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Coding & Modifications · Next Topic »
Add Reply