/    Sign up×
Community /Pin to ProfileBookmark

Hello all.
I have a schedule/program split into 9 html files (day for eace one) – named day_#.html.

How would i create a page that have two text links – next and previous – that cycle through each day, simply changing the src to an iframe?

All help apreciated

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@KorMar 14.2005 — 
split into 9 html files
[/quote]

I don't get it... After my last count, the weeks day are 7...?

Can u detail a litle bit, please?
Copy linkTweet thisAlerts:
@Warren86Mar 14.2005 — <HTML>

<Head>

<Script Language=JavaScript>

var nPages = 9;
var currPage = 1;

function turnPage(direction){

if (direction == 'next'){if (currPage < nPages){currPage++} else{currPage = 1}}
if (direction == 'prev'){if (currPage > 1){currPage--} else{currPage = nPages}}
pagePath = "day_"+currPage+".html";
window.frames['schedDoc'].location.replace(pagePath);
}


</Script>

</Head>

<Body>

<center>

<IFrame

Name ='schedDoc'

Src = 'day_1.html'

Width = '700'

Height ='300'

Scrolling = 'yes'

Border = 'yes'>

</IFrame>

<br><br>

<Table align='center' witdh='200'>

<TR>

<TD width='100'><a href=# onclick="turnPage('prev')"> Previous </a></TD>

<TD width='100'><a href=# onclick="turnPage('next')"> Next </a></TD>

</TR>

</Table>

</Body>

</HTML>
Copy linkTweet thisAlerts:
@craigsmanauthorMar 15.2005 — Cool. Thanks Warren.

That works perfectly.

Just didnt know hoy to adapt the iFrame to the script.

THanks again.
×

Success!

Help @craigsman 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 6.17,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...