Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #29061 > unrolled thread

Re: "weekly" javascript?

Started byBen Bacarisse <ben.usenet@bsb.me.uk>
First post2015-12-29 11:18 +0000
Last post2015-12-29 11:18 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.lang.javascript

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: "weekly" javascript? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-12-29 11:18 +0000

#29061 — Re: "weekly" javascript?

FromBen Bacarisse <ben.usenet@bsb.me.uk>
Date2015-12-29 11:18 +0000
SubjectRe: "weekly" javascript?
Message-ID<877fjxa4gh.fsf@bsb.me.uk>
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.

[toc] | [standalone]


Back to top | Article view | comp.lang.javascript


csiph-web