Set style to expire after X number of days (Full Version)

All Forums >> [Web Development] >> Cascading Style Sheets



Message


sourkrouse -> Set style to expire after X number of days (7/16/2008 16:27:19)

Hello,

We use yellow highlighting to indicate a change in text on the proccedure. I wonder if there is something in CSS where I could set the yellow highlighting to expire after 7 days. or maybe Javascript? I guess it would have to know when I applied the yellow highlight because I may highlight #5 as changed this month and then next month #6 will change.

Hopefully this makes sense, any ideas are appreciated! Thank you.




mtfm -> RE: Set style to expire after X number of days (7/16/2008 17:15:42)

Just googling,the following page came up... http://www.javascriptkit.com/script/script2/newimage.shtml





But, let mwe tell you what I did-- it's not exactly the same, but what I do is I have 12 pages set up, one for each month.

In January, you click the "new this month" button and it takes you to January's page. In Feb, you go to Feb's page. etc. And I have a "new last month" page too, so that the last full month and the current month are always linked.



I did what I did for a specific reason--- while you can do exactly what you said, it requires a change in the code every 7 days (or however often you want to change it.). eg you can tell it to highlight a certain paragraph for 7 days, but then 7 days comes and goes, it is no longer highlighted and nothing else happens. Then your code gets really cluttered up with this useless stuff that doesn't do anything anymore. (unless you go in and manually clean it up, of course, which I think is a pain when you can have something automated).









jaybee -> RE: Set style to expire after X number of days (7/16/2008 18:26:35)

I don't get this. One assumes you have to go in and add the code/content for the new thing that's going to get highlighted? So have a class in the css which is a highlight, formatted however you want, then just put the class against the new content. Then take the class off the old one.

<p class="newstuff">This is my new content</p>

Automated stuff is all very well but as mentioned before, you'll end up with mountains of obsolete code knocking around.

The other way to do it is use PHP or ASP to automatically generate new markers on text that sits in a database, or, just go get a CMS, they usually do it for you.




sourkrouse -> RE: Set style to expire after X number of days (7/17/2008 20:36:10)

Thanks to all. I got sidetracked with another project so I'll have to sit on this for awhile. We use RoboInfo 5 with no ETA on replacement software. It's not "friendly" with anything, especially ASP so not a lot of options. I was trying to eliminate about an hour each week of going back inot each project and removing the yellow highlight from all the new stuff previous, it's just very tedious.

Thanks for the suggestions. I will root around a bit. Any development software ideas you have are appreciated. Our content is mostly documented best practices/procedures and product information. We are looking into MadCap Flare.




jaybee -> RE: Set style to expire after X number of days (7/18/2008 5:57:51)

OK, in the css set up two classes:

.highlighton {background-color:#ff0;}
.highlightoff {background-color:inherit}

Every time you add something new give it a class="highlighton"

When you need to change something and remove old highlights, first do a find and replace in all your html pages - replace class="highlighton" with class="highlightoff"

Then add your new content giving it a class="highlighton"

Should take you 5 minutes.





Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.046875