Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4

Thread: Calendar Help !

  1. #1
    Junior Member
    Join Date
    Jan 2011
    Posts
    2
    Member #
    26527
    I have a page on my site with a table in it that has a calendar for January thru June, my question is can I use javascript to auto update and highlight todays date.
    Right now if I want to highlight todays date I have to change the "class" of the <td> for todays to get it to change the font color and background color. I want to try and "automate" this process if I can, I dont want to have to go into the code every day at midnight and change the "class" to the next days <td>. Can anyone help me out ?

  2.  

  3. #2
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    Seems to me you could do this with PHP - I'm not sure of the exact syntax but you'd put the date in the page somewhere

    Code:
    <?php  
    echo date('l\, F j\, Y');      //echos the date in the page. 
    ?>
    and then have a file that reads the date and updates the calendar accordingly.
    Good design should never say "Look at me!"
    It should say "Look at this." ~ David Craib


    http://digitalinsite.ca ~ my current site . . info@digitalinsite.ca ~ my email

    If you feel that someone's post helped you fix your problem, answered your question, or just made you feel better, feel free to "Like" their post. The "Like" link is at the bottom right of each post, along side the "reply" link. And if you are being helped here, try to help someone else - pass it on!

  4. #3
    Senior Member Dorky's Avatar
    Join Date
    Jun 2009
    Location
    Destin Florida
    Posts
    1,430
    Member #
    19103
    Liked
    4 times
    or just rename the index to index.php and place the code she gave you in the place you want the date to appear, style as needed.

    while($get_it !== true){ continue; }

  5. #4
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    Dorky - you are my guy for pointing out simple solutions to what I see as complex problems!! Thanks!
    Good design should never say "Look at me!"
    It should say "Look at this." ~ David Craib


    http://digitalinsite.ca ~ my current site . . info@digitalinsite.ca ~ my email

    If you feel that someone's post helped you fix your problem, answered your question, or just made you feel better, feel free to "Like" their post. The "Like" link is at the bottom right of each post, along side the "reply" link. And if you are being helped here, try to help someone else - pass it on!


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:07 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com