JavaScript kind of creeps up on you.

I don't work on any web pages that are particularly fancy or sophisticated. The main page I work on is the ordering page I maintain (but did not write) for a small company. Their product is pretty simple--a subscription service with some downloadable software to use the service. The ordering page has a section where you can select your subscription length (monthly, quarterly, yearly) with some radio buttons and a checkbox for buying a copy of the software on CD-ROM, a section for entering your email address and billing address, a section for entering your credit card information, and a button to submit your order.

They really want to keep this as one page.

Originally I'm pretty sure they had no JavaScript on the page. That was back when we didn't have to collect sales tax except to customers in our own state, and before the state's tax laws made online sales based on buyer location rather than seller location. The checkout page simply showed your total without tax, and had a note that said if you were in our state we would add tax of X% where X was the sales tax at our office.

Later, when the state switched to buyer based taxing, I believe JavaScript was added. That message about taxes started off just saying tax would be added to in-state orders without stating the rate. When you filled in the zip code, the JavaScript would see if it was an in-state zip code and update that to mention the rate for that zip (which it got from a static table in the JS). It might have even been fancy enough to also show you the total.

But if you did not have JavaScript it still all worked.

Somewhere in there the JavaScript started doing checks for things like missing form entries and blocking submission until the user fixed them. Still worked without JavaScript.

When we started selling in Europe and the UK and had to collect VAT, the JavaScript got a little fancier. Now it knew the VAT rates by country so it could show the VAT before you ordered.

The PHP script that served the page would decide what currency you probably used based on your IP. I modified that to include a dynamically generated JavaScript table on the page that had the prices of all the products on the page in USD, EUR, and GPB, added a currency select dropdown on the page, and added JavaScript to switch all the prices and totals on the page if the user changed the currency.

But it still worked fine without JavaScript. You might see the prices listed in EUR say, and switch the dropdown to GPB, and your order would then be done in GBP using the GBP pricing. You just wouldn't see the actual GBP amounts until you got the receipt page.

What finally stopped it working without JavaScript was a change Visa and MasterCard (and I think some others) made to what merchants have to do when accepting credit card and when storing cards for recurring or on-file billing [1].

You must show the total that will be charged and get approval from the user before submitting the card. You must tell them how often they will be re-billed and for how much. You must tell them what card will be billed (and re-billed). You must get positive confirmation that they have seen this information.

For that, we added a section at the bottom of the page that spells all that out, and has a checkbox they have to check to confirm they saw it. The ordering button does not work until that checkbox is checked.

As the user changes what products are selected, JavaScript is updating the total in the order summary, and updating that disclosure section at the bottom of the page. Same as they change currency. If they changed address, the JavaScript calls a tax API on the server to find the tax, and updates the page. Same if they change the credit card information. The JavaScript unchecks the acknowledgement checkbox if they make any of these kinds of changes after they acknowledged before.

Making that work without JavaScript would, I think, require going to a multi-page order flow which management really does not want to do. I've done some measurements, and everyone who has tried to order over the last two years (both real and bots up to who knows what) have had JavaScript enabled so it is pretty hard to argue that adding a separate milti-page order flow to handle non-JS people is worth the development time.

And so now we've got a page that requires JavaScript. No one set out to require JavaScript, but here we are.

[1] Well...they said they were making this change. They originally announced it, then when it was close to going into effect many payment processors said they weren't ready and Visa pushed it back a year. The payment processor we use got it supported by that second deadline, and we got our site and backend changed, but others were still not ready and Visa delayed it again. I'm not actually sure if it ever went into effect or is still being pushed back.