Is this possible? #2 - Post ID 285301

User 2018970 Photo

Registered User
11 posts

Is it possible to have a form display a dynamic message based on the day of the week. What I want to do is have a message displayed on Wednesday of every week but not on any other day.
User 187934 Photo

Senior Advisor
19,161 posts
Online Now

Hi Bradley,
Yes this can be done with php or Jquery. Here's the Jquery method. Change the myid to the actual id of the item your hiding or showing.
<script src=""></script>
var jQ = $.noConflict(true);
// version 1
jQ(document).ready(function () {
//day == Sun=0, Mon=1, Tues=2, Wed=3, Thurs=4, Fri=5, Sat=6
var d = new Date();
var dayOfWeek = d.getDay();
if (dayOfWeek == 3) {
else {
<div id="myid">Today is Wednesday</div>
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
This is a site I built for use in my job.(HTML Editor)
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.