4 ms·
> there's a huge number of professional, revenue generating websites out there that just host a form. And that form probably just needs to send an email. You d
by eduction 3y ago
> there's a huge number of professional, revenue generating websites out there that just host a form. And that form probably just needs to send an email.
You don’t need JavaScript or htmx for this. It’s been in the html standard since 1.0. Forms work from plain vanilla html.
> Using a form, then a network request to some service, then showing some HTML will solve 100% of the problem for the local hair salon taking reservations, some mom and pop store's contact form, or a local newspaper's letter to the editor form.
All of these things can be done without htmx or JavaScript. It’s just forms.
(You “need” htmx or JavaScript if you need to dispatch a request without actually submitting the form and triggering a new page load, for example to autocomplete an email or get search suggestions. None of your examples need that.)
- giraffe_lady 3y agoThis response is an excellent example of how, when stating a case or making an argument on HN, you should provide as little concrete information as possible and avoid a specific example if possible. The point they were making was that for many small single-purpose sites the interactivity needs are low but for various technical or social reasons may be higher than exposed with pure html/css, and htmx meets those needs adequately without adding much additional complexity. But they used forms as an example, and now you're deep in the nitpicky weeds about the semantics and capabilities of html forms, having missed the point and left it in a ditch miles ago.
- eduction 3y agoNot really, I was directly refuting their bigger point, which was that htmx is not in an uncanny valley between basic HTML and real Javascript because there are all kinds of simple use cases where htmx is ideal. They then listed off use cases that in fact do not require htmx :-) If you're going to make a point like that via examples, they should be (in aggregate) useful examples that make your point! Even setting aside that examples made up basically that poster's entire point, the reason people provide examples even for more developed argumernts is because concrete evidence is important to persuasiveness (not because they are being charitable). When someone tries multiple examples and none prove their point, it's perfectly valid to point that out.
- unmole 3y agoHow do you make a request to a URL and then turn the response into HTML without JavaScript?
- BozeWolf 3y agoBy submitting the form with a post request and then load an entire page with a thank you message or the form again with validation errors. Like it’s 1999.