/    Sign up×
Community /Pin to ProfileBookmark

change iframe source based on time

Hi all,

Great site you’ve all got here. Should help me a lot.

Anyway, I have looked around but have not been able to find the answer to this question. I believe it should be possible…

Can you change the source of an iFrame using javascript based on time?

Say I wanted this to occur every 20 secs and run between a few different pages?

Also would it be possible for the script to dynamically handle however many pages I had in that directory? If the files were named source1.htm source2.htm etc? So that I would not need to change it every time I changed the amount of file?

Thanks for any help. Hopefully I didn’t miss a post with all this in it 

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@swish22authorMay 11.2006 — Just to clarify it doesn't need to be dynamically handling, i just thought that might be nice.
×

Success!

Help @swish22 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...