PDA

View Full Version : Need random start on <IFRAME> Ticker



blue8019
11-08-2009, 09:30 PM
1) Script Title: <IFRAME> Ticker

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex2/iframe-ticker.htm

3) Describe problem: is it possible to use this script and have it start randomly instead of Position #0? I do not want to use the DHTML Ticker Script (http://www.dynamicdrive.com/dynamicindex2/generaltick.htm) for it is too cumbersome and is not easily formatted into my web page. I know about the random start for this script posted in the forums here, but it still does not meet my needs.

This particular script <IFRAME> Ticker looks and works great, I just need it to start randomly for I have over 100 tickers to display.

Thanks!

jscheuer1
11-09-2009, 03:41 AM
Replace (on exfile.htm):


window.onload=rotate_content

with:


window.onload=function(){
get_total();
curindex = Math.floor(Math.random() * totalcontent);
rotate_content();
};

blue8019
11-09-2009, 12:37 PM
Thank you John, this is perfect!!

You have made my life much easier today..........

Have a great day!

Randy