Display different image between dates using ASP

D

DavidM

Hello -- I would like to display a different logo on my website for
different seasons of the month.

I currently have a logo for Halloween, Thanksgiving, and December.

Can someone tell me what VBScript/ASP code I need to display an HTML image.

Basically:
1) any date from 10/01 thru 10/31 I would like to display the Halloween.
2) any date between 11/01 - 11/30, I would like to display Thanksgiven.
3) any date between 12/01 - 12/31, I would like to display the Christmas.

Any help would be appreciated.
 
D

DavidM

I understand that -- but a simple:

If Date > 10/01 And Date < 10/31 Then
Response.write "Display Logo1"
Elese
Response.write "Display Logo 2"
End If

Doesn't work..
 
B

Bob Barrows [MVP]

Or

Select Case Month(date)
Case 1
Response.write "January"
....
End Select
 
D

DavidM

Ahhh---such an elegant approach.

I like this much better.

strImage="logo_default.gif"
Select Case Month(Date)
Case 10
strImage="logo_oct.gif"
Case 11
strImage="logo_nov.gif"
Case 12
strImage="logo_dec.gif"
End Select

Perfect and makes perfect sense.
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top