Path: csiph.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!1.eu.feeder.erje.net!news.albasani.net!.POSTED!super70s From: super70s Newsgroups: comp.lang.javascript Subject: Re: "weekly" javascript? Date: Sun, 27 Dec 2015 12:03:13 -0600 Organization: albasani.net Lines: 53 Message-ID: References: X-Trace: news.albasani.net QgQ7Q8s125UmP9qdea3FOtt+s9iztnoWZQXxFX22+YlKak8D/ijO+svjbXpiFGTUwYiO2JqDFuw7kjFzEgiiBBe9bpmsjI9eqP9hotLyvkTKkK+PfNea3E4YE1TJ8SRs NNTP-Posting-Date: Sun, 27 Dec 2015 18:03:18 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="pqwb3SjD7XLVsC0YPc7UR5uGnG1tdBmRgrnx7kJDmXVHjRL3/tnDTLG98FAE2twQrnK19icuwEfghzi/KFbeUCv+X4vwGqROlFABSR/WASfGIrsUf4QEKwjYUR7kk2ek"; mail-complaints-to="abuse@albasani.net" User-Agent: MT-NewsWatcher/3.5.2 (PPC Mac OS X) X-No-Archive: yes Cancel-Lock: sha1:/YEUu+NPMPSTs2skYeF9zu8X6is= Xref: csiph.com comp.lang.javascript:29044 In article , ram@zedat.fu-berlin.de (Stefan Ram) wrote: > super70s writes: > >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 just don't know if this could work with the HTML markup that's > >required for the above, when I tried to insert HTML (say, bold text) for > >the birthday one, it wouldn't work at all. > > The following example shows how to insert a strong element > read from a file ğexampleĞ. > > > Main > >

>

> 
OK, but how do I indicate the appropriate element to come up according to the week of year? I think it would be way too complicated to pull off the more I think about it, in some years it would be "week ending Jan. 1, Jan. 8, Jan. 15...," then in another one it would be something like "week ending Jan. 3, Jan. 11, Jan. 17...." For each of the 5 groups (1970/75, 1971/76, 1972/1977, 1973/1978 and 1974/1979), I would need to indicate a firm date (plus 7 days since it's "week ending...") to pull up the appropriate element, I guess.