a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Hosting from $3.99 per month!

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions. dd

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Of the day

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> General Web Development >> Of the day
Page: [1]
 
abbeyvet

 

Posts: 5095
From: Kilkenny Ireland
Status: offline

 
Of the day - 11/2/2001 23:33:00   
I wish to have a small section of a page which includes one thing on a Monday, another on Tuesday, another on Wednesday and so on.

I can find stuff that will let me have one according to date of the month or ramdomly, but not by day of the week.

Anyone know of some kind of script available? Not ASP though, unix server. I would prefer a perl or php script using ssi but am failing miserably to find one. Javascript?

------------------
Katherine

InKK Design
LinKKs - Kilkenny's Online Magazine


-*-*-*-*-*-*-*-*-*-*
"Dogs have owners, cats have staff!"

ginnie

 

Posts: 527
From: St. Louis MO USA
Status: offline

 
RE: Of the day - 11/2/2001 13:50:00   
Katherine,

How about something like this:

<Script Language="JavaScript">
var now = new Date()
var d=now.getDay()

if (d == 0){
document.write ("This is the text (or code)for Sunday.");
}
else if (d == 1){
document.write ("This is the text (or code) for Monday.");
}
else if (d == 2){
document.write ("This is the text (or code) for Tuesday.");
}
else if (d == 3){
document.write ("This is the text (or code) for Wednesday.");
}
else if (d == 4){
document.write ("This is the text (or code) for Thursday.");
}
else if (d == 5){
document.write ("This is the text (or code) for Friday.");
}
else if (d == 6){
document.write ("This is the text (or code) for Saturday.");
}
</Script>

ginnie

------------------
Global Presence Web Design


(in reply to abbeyvet)
abbeyvet

 

Posts: 5095
From: Kilkenny Ireland
Status: offline

 
RE: Of the day - 11/2/2001 14:18:00   
Thanks Ginnie, but I just figured out how to do it using SSI which is what I really wanted to do since I want an entire differnt file to appear as an include depending on the day. This does it:

<!--#config timefmt="%A" -->
<!--#if expr="$DATE_LOCAL = Monday" -->
<!--#include virtual="monday.txt" -->
<!--#elif expr="$DATE_LOCAL = Tuesday" -->
<!--#include virtual="tuesday.txt" -->
<!--#elif expr="$DATE_LOCAL = Wednesday" -->
<!--#include virtual="wednesday.txt" -->
<!--#elif expr="$DATE_LOCAL = Thursday" -->
<!--#include virtual="thursday.txt" -->
<!--#elif expr="$DATE_LOCAL = Friday" -->
<!--#include virtual="friday.txt" -->
<!--#elif expr="$DATE_LOCAL = Saturday" -->
<!--#include virtual="saturday.txt" -->
<!--#elif expr="$DATE_LOCAL = Sunday" -->
<!--#include virtual="sunday.txt" -->
<!--#endif -->
The page I tried it on is here:

www.inkkdesign.com/ssitest/

------------------
Katherine

InKK Design
LinKKs - Kilkenny's Online Magazine


-*-*-*-*-*-*-*-*-*-*
"Dogs have owners, cats have staff!"

[This message has been edited by abbeyvet (edited 11-02-2001).]


(in reply to abbeyvet)
ginnie

 

Posts: 527
From: St. Louis MO USA
Status: offline

 
RE: Of the day - 11/2/2001 16:51:00   
That'll work too.

Glad you got it worked out.

ginnie

------------------
Global Presence Web Design


(in reply to abbeyvet)
Page:   [1]
OutFront Discoveries

All Forums >> Web Development >> General Web Development >> Of the day
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts