Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.
SignUp Now!
the word "Present" in the html table (data comes from JSON file), will have the green theme. And if Tardy is selected, then the tardy theme will be applied anytime the word absent shows up on the html table and if absent is selected then the Absent theme will be applied anytime the word absent shows up on the html table. I don't know if I'm explaining it properly but I hope I am.Dear Mr/Mrs/Ms. Mortal,
I have a hard time trying to understand what you're asking, not just here but in every question I read. After investing time I ask myself "Why do they want to do that?". My hang-up is your use of Json, but I think I got it with this question.
You're not styling every little element with a selection process, but picking an overall style sheet to use for the page or table. Is that correct?
When I have done this in the past the selection was stored locally and JS used to retrieve it on page load.
yes.OK, this will be done server-side with PHP. PHP will read the data from the DB and construct a JSON file. It will check for the presence of one of the three words and use that to determine the style and send that info in the same file. JS will read that and change the style of as many elements as needed.
Do you require an example?
Code Forum is a community platform where coding enthusiasts can connect with other developers, engage in discussions, ask for help, and share their knowledge with a supportive community. It's a perfect place to improve your coding skills and to find a community of like-minded individuals who share your passion for coding.
We use essential cookies to make this site work, and optional cookies to enhance your experience.