amberlamps
BANNED
- Jun 24, 2010
- 331
- 145
Okay i need to randomly rotate iframe/div on every page load or refresh
so say a visitor land on the page he his shown a random iframe
i will like to randomly show 10 iframes one per visitor randomly.
I looked every where and couldent find it, found text rotation, image and i tried to modify it to iframes but it just didnt work...
any help appreciated thank you
i need it to rotate a div, i figured out how to do it with a iframe but i need it cake sliced so i can iframe just a specific area
here the teext rotator i just sent time timeout to like 10000 it does waht i need it to do is rotate but it can only rotate iframe i need it to rotate div, hope i dont sound too confusing
so say a visitor land on the page he his shown a random iframe
i will like to randomly show 10 iframes one per visitor randomly.
I looked every where and couldent find it, found text rotation, image and i tried to modify it to iframes but it just didnt work...
any help appreciated thank you
i need it to rotate a div, i figured out how to do it with a iframe but i need it cake sliced so i can iframe just a specific area
here the teext rotator i just sent time timeout to like 10000 it does waht i need it to do is rotate but it can only rotate iframe i need it to rotate div, hope i dont sound too confusing
Code:
<script language="JavaScript">
function rotateEvery(sec)
{
var Quotation=new Array()
// QUOTATIONS
Quotation[0] = 'First quotation';
Quotation[1] = 'Second quotation';
Quotation[2] = 'Third quotation';
Quotation[3] = 'Fourth quotation';
Quotation[4] = 'Fiveth quotation';
Quotation[5] = 'Sixth quotation';
Quotation[6] = 'You can add <b>as many</b> quotations <b>as you like</b>';
var which = Math.round(Math.random()*(Quotation.length - 1));
document.getElementById('textrotator').innerHTML = Quotation[which];
setTimeout('rotateEvery('+sec+')', sec*1000);
}
</script>
</head>
<body onload="rotateEvery(1)">
<div id="textrotator"><!--Quotations will be displayed here--></div>
Last edited: