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. 7 1705
a simple IF/THEN with Response.Write() will work if you dont store the info
in a DB.
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"DavidM" <sp**@spam.net> wrote in message
news:Ok**************@tk2msftngp13.phx.gbl... 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.
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..
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl... a simple IF/THEN with Response.Write() will work if you dont store the info in a DB.
-- Curt Christianson Owner/Lead Developer, DF-Software Site: http://www.Darkfalz.com Blog: http://blog.Darkfalz.com
"DavidM" <sp**@spam.net> wrote in message news:Ok**************@tk2msftngp13.phx.gbl... 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.
this works for me
<%
if Date > "12/1/2004" and Date < "12/31/2004" then
response.write "yes"
else
response.write "no"
end if
%>
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"DavidM" <sp**@spam.net> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl... 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.. "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message news:%2****************@TK2MSFTNGP15.phx.gbl...a simple IF/THEN with Response.Write() will work if you dont store the info in a DB.
-- Curt Christianson Owner/Lead Developer, DF-Software Site: http://www.Darkfalz.com Blog: http://blog.Darkfalz.com
"DavidM" <sp**@spam.net> wrote in message news:Ok**************@tk2msftngp13.phx.gbl... 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.
What if I don't want to hardcode the year?
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl... this works for me
<% if Date > "12/1/2004" and Date < "12/31/2004" then response.write "yes" else response.write "no" end if %>
-- Curt Christianson Owner/Lead Developer, DF-Software Site: http://www.Darkfalz.com Blog: http://blog.Darkfalz.com
"DavidM" <sp**@spam.net> wrote in message news:%2****************@TK2MSFTNGP10.phx.gbl...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.. "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message news:%2****************@TK2MSFTNGP15.phx.gbl...a simple IF/THEN with Response.Write() will work if you dont store the info in a DB.
-- Curt Christianson Owner/Lead Developer, DF-Software Site: http://www.Darkfalz.com Blog: http://blog.Darkfalz.com
"DavidM" <sp**@spam.net> wrote in message news:Ok**************@tk2msftngp13.phx.gbl... 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.
if Date > CDate("12/1/" & Year(Date)) and Date < CDate("12/31/" &
Year(Date)) then
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"DavidM" <sp**@spam.net> wrote in message
news:u4**************@TK2MSFTNGP12.phx.gbl... What if I don't want to hardcode the year?
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl... this works for me
<% if Date > "12/1/2004" and Date < "12/31/2004" then response.write "yes" else response.write "no" end if %>
-- Curt Christianson Owner/Lead Developer, DF-Software Site: http://www.Darkfalz.com Blog: http://blog.Darkfalz.com
"DavidM" <sp**@spam.net> wrote in message news:%2****************@TK2MSFTNGP10.phx.gbl...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.. "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message news:%2****************@TK2MSFTNGP15.phx.gbl... a simple IF/THEN with Response.Write() will work if you dont store the info in a DB.
-- Curt Christianson Owner/Lead Developer, DF-Software Site: http://www.Darkfalz.com Blog: http://blog.Darkfalz.com
"DavidM" <sp**@spam.net> wrote in message news:Ok**************@tk2msftngp13.phx.gbl... > 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. > > >
Or
Select Case Month(date)
Case 1
Response.write "January"
....
End Select
DavidM wrote: What if I don't want to hardcode the year?
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl... this works for me
<% if Date > "12/1/2004" and Date < "12/31/2004" then response.write "yes" else response.write "no" end if %>
-- Curt Christianson Owner/Lead Developer, DF-Software Site: http://www.Darkfalz.com Blog: http://blog.Darkfalz.com
"DavidM" <sp**@spam.net> wrote in message news:%2****************@TK2MSFTNGP10.phx.gbl... 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.. "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message news:%2****************@TK2MSFTNGP15.phx.gbl... a simple IF/THEN with Response.Write() will work if you dont store the info in a DB.
-- Curt Christianson Owner/Lead Developer, DF-Software Site: http://www.Darkfalz.com Blog: http://blog.Darkfalz.com
"DavidM" <sp**@spam.net> wrote in message news:Ok**************@tk2msftngp13.phx.gbl... > 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.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
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.
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:O9**************@TK2MSFTNGP14.phx.gbl... Or
Select Case Month(date) Case 1 Response.write "January" ... End Select
DavidM wrote: What if I don't want to hardcode the year?
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl... this works for me
<% if Date > "12/1/2004" and Date < "12/31/2004" then response.write "yes" else response.write "no" end if %>
-- Curt Christianson Owner/Lead Developer, DF-Software Site: http://www.Darkfalz.com Blog: http://blog.Darkfalz.com
"DavidM" <sp**@spam.net> wrote in message news:%2****************@TK2MSFTNGP10.phx.gbl... 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.. "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message news:%2****************@TK2MSFTNGP15.phx.gbl... > a simple IF/THEN with Response.Write() will work if you dont store > the info in a DB. > > -- > Curt Christianson > Owner/Lead Developer, DF-Software > Site: http://www.Darkfalz.com > Blog: http://blog.Darkfalz.com > > > "DavidM" <sp**@spam.net> wrote in message > news:Ok**************@tk2msftngp13.phx.gbl... >> 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.
-- Microsoft MVP -- ASP/ASP.NET Please reply to the newsgroup. The email account listed in my From header is my spam trap, so I don't check it very often. You will get a quicker response by posting to the newsgroup.
This discussion thread is closed Replies have been disabled for this discussion. Similar topics
7 posts
views
Thread by Philipp Lenssen |
last post: by
|
21 posts
views
Thread by Dan V. |
last post: by
|
6 posts
views
Thread by Sandman |
last post: by
|
6 posts
views
Thread by Yeah |
last post: by
|
3 posts
views
Thread by RAllsopp |
last post: by
|
13 posts
views
Thread by Jim Carlock |
last post: by
|
1 post
views
Thread by John Phelan-Cummings |
last post: by
|
7 posts
views
Thread by eholz1 |
last post: by
|
9 posts
views
Thread by tshad |
last post: by
| | | | | | | | | | |