Sunday, August 29, 2021
Summer 2021 Updates
Blog Entry #416
We will return to our Super Calculator discourse shortly, but we have some administrative business to deal with first...
The new and unimproved HTML Goodies
A few months ago - on or about 1 May - the HTML Goodies site was redesigned; I don't know if the current HTML Goodies owner, TechnologyAdvice, did the redesigning or not.
(A final "Post the Tables" tip was posted externally on 31 August 2000.)
<div>at a time; it is necessary to repeatedly click a button below the div to load successive sets of links into the div. The links run in roughly reverse chronological order although things get a bit chaotic upon hitting the pre-2003 Joe Burns-era material about two-thirds of the way in.
In fairness to TechnologyAdvice, I should point out that the site URLs were changed with the aforementioned 15 February 2005 redesign as well.
on 15 February 2005 its URL changed to
whereas today its URL is
Support directory notes:
is still live as of this writing.
The /img/ directory
holding images plus some code (mostly .js scripts) and the odd demo
In the last few months of 2013
The Java Goodies project was originally an htmlgoodies.com/javagoodies/ part of HTML Goodies but at some point in 1998 was spun off as a separate javagoodies.com site. Joe pulled the plug on Java Goodies/javagoodies.com in late 1999/early 2000, although most of the repository content is still accessible via the Internet Archive. Format-wise, the Java Goodies script code pages are in most cases plain-text .txt files.
Some of the Java Goodies scripts were not 'crawled' by the Internet Archive way back when but were present in the Appendix D collection, and I would link to the latter as appropriate. In 2016 or 2017, extraneous HTML started showing up in the Java Goodies scripts - I doubt that this was a gradual process, but I can't tell you exactly how it played out as it happened while I was repairing the blog potholes caused by my severing ties with EarthLink (see here, here, here, and here) - anyway, it was no longer possible to Select All ⌘A and Copy ⌘C the original, unadulterated scripts at the archived javagoodies.com as it was at the live /JSBook/ directory, so I left the former behind and subsequently worked from the latter.
One of the displays-as-it-should scripts is the "How Many Days Until Christmas?" xmas.txt script that we discussed in Blog Entry #308. Check over the https://web.archive.org/web/19981206200117/http://www.javagoodies.com/xmas.txt crawl page and its underlying source. (Actually, a .txt page shouldn't have a separate source like an .html page does, but leave that aside for the time being.) The source
<table>structure that codes the aforementioned navigation widget.
What you won't see in the source is the original "How Many Days Until Christmas?" script code; in practice, the script code on the crawl page comes from an external page (view it here) that is fetched and framed by an
<iframe id="playback" ...>. (Maybe I'm missing something, but I see no need to externalize the script code given that the navigation widget has a fixed positioning.)
Anything else? Filling things out, the source also sports
a couple of
<link>s to external style sheets,
<script>s (some with inline code, some that point to .js files) spread across the
<!-- comments -->s that annotate the navigation widget.
That the crawl page is a .txt document is significant
in that if we were viewing it on the desktop we would see
the navigation widget code rather than the navigation widget itself,
the playback iframe code rather than the "How Many Days Until Christmas?" script code, and
<!-- comments -->s.
At the Internet Archive, however, we see the crawl page as an HTML document, its .txt extension notwithstanding, because it is served to us with a text/html Content-Type, as can be confirmed by running the crawl page URL through Rex Swain's HTTP Viewer.
In contrast, check out the 8 October 1999 https://web.archive.org/web/19991008153633/http://www.javagoodies.com/makepassword.txt crawl page that I linked to for the "Make Me A Password" script that we discussed in Blog Entry #305: this page is served to us with a text/plain Content-Type, as one would expect for a .txt file.
The original "Make Me A Password" script code is present on the aforecited /makepassword.txt crawl page (the playback iframe is gone) and is now intertwined there with the same sort of supporting code
that is present in the source of the /xmas.txt crawl page and
that would not be visible on a text/html page;
the supporting code includes code for a navigation widget that would link us to a second, 2 May 1999 /makepassword.txt crawl page if it were rendered, which it is not.
I can understand why Joe posted the Java Goodies scripts as .txt files rather than as .html files:
in choosing the former there was no need
to add elements (e.g.,
<br>) that preserve the formatting of the code.
Joe subsequently formed and posted the Script Tips scripts as .html files; the Internet Archive's crawls of these scripts are linked by navigation widgets and are cleanly readable - e.g., see here and here.
This brings us back to the Super Calculator script. The https://www.htmlgoodies.com/JSBook/supercalc.html SC demo/description page is history, but at least it's archived history. I can't really say the same for the matching http://www.htmlgoodies.com/JSBook/supercalc.txt SC script code page, however; although this page is history too and has been crawled a bunch of times by the Internet Archive, the archived crawls are not clean copies of the original page but, per the /makepassword.txt example above, are adulterated with (unrendered) navigation widget code, two
<link>s to style sheets, etc.
A user shouldn't have to prune away a bunch of stuff to get to a script, so perhaps I should get back into the practice of posting these scripts myself. With no further fanfare, then, here is the original supercalc script code:
I've placed the code in a textarea box
<textarea id="scTextarea" name="myTextarea" cols="" rows="" style="width:95%;height:250px;">...SC script code...</textarea>
rather than in a div as I used to do.
Textarea advantages vis-à-vis a div
On the user's part:
(1) The user can click on the textarea box and Select All ⌘A the code in one go; it's not necessary to mousically select the code from start to finish.
(2) If the textarea content hasn't been readonly-ed, then the user can edit the code in place and then select and copy it, and you certainly can't do that with a div.
On my part:
(3) The textarea element's Text/#PCDATA content model* means that I don't have to convert
(4) White space - newlines, empty line boxes, indentation - in an external source is preserved when the source is pasted into a textarea box (however, a
white-space:pre;-styled div will also preserve white space).
*Content model fallout:
(i) I can't mark up the code with the
<code>element as I normally would.
(ii) Remember those
s that push the by Tom Richardson Jr. authorship credit to the right? Left untouched, they are rendered as spaces in the textarea box just like they are on the page: to print them out as
s in the box, it is necessary to literalize the
Other supercalcs, in the name of completeness
- this page dates to 1998 or so, Angelfire is still around but is now owned by Lycos, check the source for the code
<body>markup, adds a
- places the
<script>just inside the
<body>, which is OK, but does not delete the original
</head>end tag that immediately follows the
- displays the code in a textarea box on the page, maybe I should do that from now on
<html>markup, inserts a
<head>start tag before the
<body>markup and sets the
- quotes all attribute values, tweaks a couple of numerical settings
- the two links have extraneous
tppabsattributes that are set to the original
hrefURLs (this isn't standard, it's some sort of offline browsing thing, I'm not familiar with it), they also have
hrefattributes that point to an http://www.htmlpoint.com/jscript/tppmsgs/msgs0.htm page that is no longer available