Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #29061
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: "weekly" javascript? |
| Date | 2015-12-29 11:18 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <877fjxa4gh.fsf@bsb.me.uk> (permalink) |
| References | <super70s-3DE5C2.10244827122015@reader.albasani.net> |
super70s <super70s@super70s.invalid> writes: > One of the features on my site is putting up the No. 1 single and LP a > certain amount of years ago (currently alternating between 40 or 45 > years ago every week, as the years progress it will eventually be > 45/50). I do this according to what week of the year it is currently, > and have been doing this manually every week for a long time. > > I was just wondering if there's a good JS I could use for this, say put > all 52 weekly items in a separate file and then have the appropriate > item come up according to what week it is? > > I have a "birthday" JS on the same page that's worked pretty well for me > over the years, I just have to change it each month.... > > <script language="JavaScript"> <snip> This group tends to discuss client-side scripting (as in your example) but both the "historic single" and "birthday" examples are classic cases that are usually best handled by server-side code. (Obviously JavaScript can be used server side (see node.js) but that's not really the point.) You should consider doing some or all of this server-side. -- Ben.
Back to comp.lang.javascript | Previous | Next | Find similar | Unroll thread
Re: "weekly" javascript? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-12-29 11:18 +0000
csiph-web