The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Web Design
> CSS Help
|
Simple Css Question, and JS Script.
Discuss Simple Css Question, and JS Script. in the CSS Help forum on Dev Shed. Simple Css Question, and JS Script. Cascading Style Sheets (CSS) forum discussing all levels of CSS, including CSS1, CSS2 and CSS Positioning. CSS provides a robust way of applying standardized design concepts to your web pages.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

August 24th, 2001, 04:27 PM
|
|
Member
|
|
Join Date: Feb 2001
Posts: 5
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Simple Css Question, and JS Script.
Hey guys I am looking for help on 2 things, the first being this.
I would like to links to be colored by date, which means that the newest links would look let's say Red, after a day they would appear a blue color, and after 3 days they would look green.
Those colors are just examples but you know what I mean. I have seen a few sites doing it but not recently.
My second question is does anyone have the js coding to do the following. A small check box that let's the user decide if they want things to open in new windows or the parent one. I also seen this on a site but lost the url.
Thanks for your help I think alot of people might also be interested in these simple scripts.
Cheers!
|

August 28th, 2001, 09:05 AM
|
|
|
|
When you refer to "newest", do you mean newest according to the viewer, or newest according to when you added them to the page?
__________________
 Michael
|

September 1st, 2001, 04:51 AM
|
|
Member
|
|
Join Date: Feb 2001
Posts: 5
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Based on age added, and if it has been clicked or not.
News links one color older ones another color olderest links yet another color.
|

September 1st, 2001, 02:14 PM
|
|
|
|
The only way you could do that, is if you either had access to the viewer's history (which you don't) or if you kept track of all the users that came to your site. You could do this either by IP address or by cookie, however, the latter would be much more reliable as IP addresses can be dynamic.
So, you would have to store a cookie for each visitor, storing the timestamp of when a URL was accessed and the URL. However, you can only do that if you host the URL (by placing the code for storing the cookie *on* that page). It should be relatively simple, because you can use the same code on all the pages, but then when it comes time to display the URLs, you will need to access all of the cookies and perform logical calculations on what color to use for displaying the link. I don't know of any "cookie-cutter" examples, though.
Now, if the URLs are not on your web site, the only way you're going to be able to do this is if you have a "buffer" page that they access (that *is* stored on your site) prior to being redirected to the actual page. However, this is only going to work if they visited the URL by clicking on your link. If they decided to visit the URL outside of your links, your links are not going to show accurate colors.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|