Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

HTML & CSS compare table column with todays date

rae

New Coder
I'm simply a noob looking for the best approach. I have a two column table.html. I would like to display the data in column one when the date in column two matches todays date? Column two has the date, column one has the desired data. I would like to do this at one am everyday?
I can't seem to figure how to make html lookup todays date and compare it to the dates in column 2 of my table. when there is a match, display the data from the table in my index.html page.

is this something html can do?

thank you.
 
Basically, you have to split data, code and output.
  1. Data is usually kept in outer resource, but you can embed it in HTML using Javascript JSON.
  2. Code is meant to extract data subset you need
  3. Manipulate HTML DOM / construct HTML by server side scripting to format and show extracted data
There are many ways to do it.
  • Use outer database (such is MySQL) to keep your data, run SQL query over AJAX, then dynamically construct HTML from the data got by the query
  • There are ways to keep data in XML and use a library to access the data. Then, dynamically construct HTML utilizing the library queries
  • Keep data in outer JSON, load it over AJAX (you can also embed JSON in HTML), use Javascript to loop over data, then, again, dynamically construct HTML using the loop
  • ...
Probably the simplest way for professionals is to use SQL and PHP/ASP/JSP/Node.js, but you can do it quicly, using only HTML/JSON/Javascript DOM manipulation.
 
Last edited:
Ok, so I believe I'm on the right path, I have an external file for my data lookup, just need to research how to use JSON, to compare todays date with my external file. Thanks for the guidance.
 

New Threads

Buy us a coffee!

Back
Top Bottom