CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 24th, 2001, 04:27 PM
CG CG is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Posts: 5 CG User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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!

Reply With Quote
  #2  
Old August 28th, 2001, 09:05 AM
pieux pieux is offline
Seņor Member
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Aug 2000
Posts: 1,156 pieux User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 17 m 59 sec
Reputation Power: 9
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

Reply With Quote
  #3  
Old September 1st, 2001, 04:51 AM
CG CG is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Posts: 5 CG User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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.

Reply With Quote
  #4  
Old September 1st, 2001, 02:14 PM
pieux pieux is offline
Seņor Member
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Aug 2000
Posts: 1,156 pieux User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 17 m 59 sec
Reputation Power: 9
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > Simple Css Question, and JS Script.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway