View Full Version : changing timing in scroller

02-09-2007, 04:47 PM
1) Script Title:
IFRAME scroller
2) Script URL (on DD):
3) Describe problem:
can I change the timing for the script to make it by date so every day will show one Item, for a month?

02-09-2007, 05:29 PM
The script that you link to in your post has no such timing mechanism to begin with. Perhaps you are thinking of the daily iframe?

Anywys, to alter this scroller script for monthly content though, you could just changes this:

var iframesrc="external.htm"

var scd=new Date();
var iframesrc="external"+scd.getMonth()+".htm"

Then you would need 12 external pages numbered 0 to 11:

. . .

0 is for January, 1 for Feb. and so on, 11 is Dec.

For daily content use:

var scd=new Date();
var iframesrc="external"+scd.getDate()+".htm"

You would then need 31 pages numbered from 1 through 31.

If you just want 7 pages, Sun. through Mon., use:

var scd=new Date();
var iframesrc="external"+scd.getDay()+".htm"

The seven pages would be numbered 0 (Sunday) through 6 (Monday).

02-09-2007, 06:12 PM
I will test and inform you, Thanks a lot