changing pages on a schedule

G

Glenn

I know how to use the controls to have a page show during a given time, say
from January 1 - February 15.

What I'd like to do is this:

Put a series of pages on my website such as:
January.htm
February.htm
March.htm

Is there a way to code it so that in January the January.htm page is the one
that shows up, in February the February.htm page, etc.?

Thanks.
 
K

Köck Matthias

Hello,
I know how to use the controls to have a page show during a given time, say
from January 1 - February 15.
Which technique do you use?
If its JavaScript, you need only to "ask" the computer
which month we have and based on the answer load the page
you want.

Example:
<!--
// HTML is interpreted by IE which I used to
// read the Newsgroup, I have to comment it

<script language=javascript>
var loc=new Array("january","februar","march",...);
var d=new Date();
window.location=loc[d.getMonth()]+".htm";
</script>

// Replace the dots by further months if you need them.
-->

But: It won't work at a browser that doesn't understand
JavaScript.

Another solution could be PHP, but you have to ask another
one to explain it. PHP as server-side language will work
everytime if your server offers PHP.

Köck Matthias
 
G

Glenn

Where can I find out more about PHP? Does it come on Server 2000?

Hello,
I know how to use the controls to have a page show during a given time, say
from January 1 - February 15.
Which technique do you use?
If its JavaScript, you need only to "ask" the computer
which month we have and based on the answer load the page
you want.

Example:
<!--
// HTML is interpreted by IE which I used to
// read the Newsgroup, I have to comment it

<script language=javascript>
var loc=new Array("january","februar","march",...);
var d=new Date();
window.location=loc[d.getMonth()]+".htm";
</script>

// Replace the dots by further months if you need them.
-->

But: It won't work at a browser that doesn't understand
JavaScript.

Another solution could be PHP, but you have to ask another
one to explain it. PHP as server-side language will work
everytime if your server offers PHP.

Köck Matthias
 
K

Köck Matthias

Hello,
Where can I find out more about PHP? Does it come on
Server 2000?
As I wrote - you have to ask at your server or to test if
PHP is offered.
To find something I recommand a search engine. Try PHP
+Tutorial at www.google.com or www.lycos.com etc. I know
only German PHP-Tutorials (I don't think they'll help you).

Köck Matthias
 
M

Mike Mueller

As Köck states in the PHP route, you need to know what your provider has.
If PHP then you can do that. I dont know PHP and my provider doesn't offer
it. I do have ASP available and that is basically just vb. Your could then
do a Server Side Include. The following example changes by week. You would
need to modify it obviously.

<%
Dim WeekNumber
Dim WeekPage
WeekNumber = DatePart("ww", Date, 1,1)
%>

<% If WeekNumber= "1" then %>
<!--#include file="week1.asp" -->
<% End If %>
<% If WeekNumber = "2" then %>
<!--#include file="week2.asp" -->
<% End If %>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top