Display message based on a date range

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Aug 2008
Posts: 2
Reputation: jsl11 is an unknown quantity at this point 
Solved Threads: 0
jsl11 jsl11 is offline Offline
Newbie Poster

Display message based on a date range

 
0
  #1
Aug 3rd, 2008
I did a search of this forum and didn't find anything on this issue. I want to display a specific message based on a date range. For example if it's June 10, I would like to display the message "Schools out! Enjoy your summer break." I would like this message then to be displayed the whole summer. Then in August I'd like a new message to appear. Something like "Heading back to school" and have that appear until Sept when a new message will be displayed.

I'm just starting out and could really use the help.

Thanks
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 18
Reputation: jel3 is an unknown quantity at this point 
Solved Threads: 3
jel3's Avatar
jel3 jel3 is offline Offline
Newbie Poster

Re: Display message based on a date range

 
0
  #2
Aug 3rd, 2008
what programing language are you looking to do this with?

if PHP you could do it by using the date function to get the current date and then use an if statement to sellect the message to print out.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 2
Reputation: jsl11 is an unknown quantity at this point 
Solved Threads: 0
jsl11 jsl11 is offline Offline
Newbie Poster

Re: Display message based on a date range

 
0
  #3
Aug 3rd, 2008
My bad, I just thought everyone would know what I was thinking. I am using java script. I've come up with a solution and now I'm addressing the issue of mozilla and ie rendering different results on getYear. I guess that can be addressed through determining a browser and making a function call based on the browser type.
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 7,651
Reputation: ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of 
Solved Threads: 474
Super Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Failure as a human

Re: Display message based on a date range

 
0
  #4
Aug 4th, 2008
> I've come up with a solution and now I'm addressing the issue of mozilla and ie rendering
> different results on getYear.

Linky
I don't accept change; I don't deserve to live.

Jo Tujhe Jagaaye, Nindein Teri Udaaye Khwaab Hai Sachcha Wahi.
Nindon Mein Jo Aaye Jise To Bhul Jaaye Khawab Woh Sachcha Nahi.
Khwaab Ko Raag De, Nind Ko Aag De
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum


Views: 1439 | Replies: 3
Thread Tools Search this Thread



Tag cloud for JavaScript / DHTML / AJAX
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC