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 1787
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 thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Philipp Lenssen |
last post by:
I created Search.CSS which grabs Google results (using the Web API),
displays as XHTML1.0 Strict + CSS, and recently also adds Thumbnails....
|
by: Dan V. |
last post by:
I have tried a number of things including preloading, but the background
image (water tile in header) in IE 6 will not display where other browsers
will....
|
by: Sandman |
last post by:
I'm having some problem here...
I have a javascript I've downloaded that goes through all PNG files and enables
the transparency channel in them for IE5.5+ by converting them to SPAN layers
with...
|
by: Yeah |
last post by:
I have alternate holiday headers for my web site, and I would like to
display a certain image for an upcoming holiday. Examples:
Christmas 12/10 - 12/26
New Years Eve 12/27 - 1/2...
|
by: RAllsopp |
last post by:
I have a client who would like to have several pictures associated
with one system. I have read about storing only the pathname to save
OLE overhead and have set-up a form for my client to...
|
by: Jim Carlock |
last post by:
I have over a hundred pictures I would like to present.
Is it practical to create and parse an array of pictures,
picture paths, et al using server-side scripting to
accomplish this?
I...
|
by: John Phelan-Cummings |
last post by:
When I add the name of a new individual in a, bound form, it will not
display that person’s name in a label control of a second unbound form.
I have a scheduling program that I am working on. ...
|
by: eholz1 |
last post by:
Hello Group,
Perhaps you can help me. I have a mysql db, that holds images.
Images are encoded using base64_decode/encode, etc. Image data seems
fine.
I have a view.php page that is supposed...
|
by: tshad |
last post by:
This was posted before but the message got messed up (all NLs were stripped
out for some reason).
I have 2 labels that hold the name of different images on my .aspx page.
<asp:Label ID="Logo"...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |