Script: Iframe SSI script II http://www.dynamicdrive.com/dynamici...iframessi2.htm
thank you so much and I love this script. but is there anyway to change it so that we can load a random page instead of "external.htm" only?
Script: Iframe SSI script II http://www.dynamicdrive.com/dynamici...iframessi2.htm
thank you so much and I love this script. but is there anyway to change it so that we can load a random page instead of "external.htm" only?
Try changing the <iframe> HTML code so it instead reads:
This should work, although not field tested yet.Code:<iframe id="myframe" src="" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; display:none"></iframe> <script type="text/javascript"> var iframeurls=new Array() //specify random URLs below. iframeurls[1]="test.htm" iframeurls[2]="test2.htm" iframeurls[3]="test3.htm" var ry=Math.floor(Math.random()*iframeurls.length) document.getElementById("myframe").src=iframeurls[ry] </script>
![]()
Great thanks! It works. Only that I have change the array to start with [0] then everything works!
Bookmarks