Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #29061
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
| Newsgroups | comp.lang.javascript |
| Subject | Re: "weekly" javascript? |
| Date | Tue, 29 Dec 2015 11:18:06 +0000 |
| Organization | A noiseless patient Spider |
| Lines | 28 |
| Message-ID | <877fjxa4gh.fsf@bsb.me.uk> (permalink) |
| References | <super70s-3DE5C2.10244827122015@reader.albasani.net> |
| Mime-Version | 1.0 |
| Content-Type | text/plain |
| Injection-Info | mx02.eternal-september.org; posting-host="017616aa25f81ec581c44d76d61ba2f3"; logging-data="22736"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/+d6nxpfI+NJATtTUAWtIFTHVsJh0oUJY=" |
| Cancel-Lock | sha1:zmyuZs8OC8NJ7oTe/RTogLtGaxs= sha1:vqkM9nK808N8X+DKYp1tD2OaV28= |
| X-BSB-Auth | 1.421d361fe424a5c723eb.20151229111806GMT.877fjxa4gh.fsf@bsb.me.uk |
| Xref | csiph.com comp.lang.javascript:29061 |
Show key headers only | View raw
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