![]() |
|
|
#1 (permalink) |
|
Al James-PianoEntertainer
Join Date: Apr 2003
Posts: 159
|
Can this be done
Hi everyone. Just have a question which maybe someone can help with?
One of the websites I have built (using the CAT2 servers) has a page where the data could potentially change according to what day of the week it is. e.g. it is for a pianobar where they are closed on Mondays so I'd like a hidden layer to appear on Mondays that contains text that says "Closed Mondays". Then come Tuesday, another hidden layer appears and displays text showing Tuesday's piano player (and the Monday layer auto hides). Is this the kind of thing that can be date driven? I am using dreamweaver MX2004. Hope someone can offer advice. Thanks Al
__________________
Al James - Piano Entertainer www.aljames.co.uk |
|
|
|
|
|
#2 (permalink) |
|
Administrator
Join Date: May 2003
Posts: 1,299
|
Hi Al,
You could do this using pretty much any language, javascript or ASP would certainly do the trick. Regards, Jacob
__________________
Jacob Colton jacob@catalyst2.com Open a ticket | Knowledgebase | Rate catalyst2 | Review catalyst2 |
|
|
|
|
|
#4 (permalink) |
|
Administrator
Join Date: May 2003
Posts: 1,299
|
Hi Al,
Have you used any particular languages before? Regards, Jacob
__________________
Jacob Colton jacob@catalyst2.com Open a ticket | Knowledgebase | Rate catalyst2 | Review catalyst2 |
|
|
|
|
|
#5 (permalink) |
|
Registered User
Join Date: Jan 2003
Location: UK
Posts: 181
|
in ASP:
<% if WeekdayName(weekday(date)) = "monday" then %> <html code> <% end if%> <% if WeekdayName(weekday(date)) = "tuesday" then %> <html code> <% end if%> There are better ways of doing it but I think the above way is easier to understand without me explaining it. |
|
|
|
|
|
#6 (permalink) |
|
Al James-PianoEntertainer
Join Date: Apr 2003
Posts: 159
|
I use DWmx2004 wysiwyg, keen to learn other languages.
That code you psoted Adam, do I just paste it into the code section of my page? Is there a tutorial or somethin gthat I can get step by step? Thanks all Al
__________________
Al James - Piano Entertainer www.aljames.co.uk |
|
|
|
|
|
#7 (permalink) |
|
Registered User
Join Date: Jan 2003
Location: UK
Posts: 181
|
Sorry I didn't test that code, but here is how it works:
http://www.macrodemon.com/day.asp This is a good site if you are wanting to learn ASP http://www.w3schools.com/asp/default.asp If you are wanting to connect a database to the site the you also need to know ADO and SQL. Dreamweaver (I guess thats what you are using) is a very useful tool for generating database driven websites once you've learnt how to use it. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|