3 ms·
On a similar note, does anyone know if it's possible without JavaScript for a link or form or something similar to be submitted without the whole page refreshin
by busymom0 2y ago
On a similar note, does anyone know if it's possible without JavaScript for a link or form or something similar to be submitted without the whole page refreshing and still being able to update some text?
For example, the upvote, favorite, and reply actions on hacker news website. They all require a whole page refresh. Is it possible to achieve it without page refresh and without JavaScript?
- sunnybeetroot 2y agoHave you tried HTMX?
- busymom0 2y agoHTMX requires incorporating script which goes against my question.
- recursivedoubts 2y agoIf you do not wish to use any javascript, you can use iframes and the "target" attribute on links and forms: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#target https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#... However the user experience is pretty rough, which is why people typically don't use this feature. If you want a minimal amount of javascript to achieve this, we (the htmx folks) also have fixi: https://github.com/bigskysoftware/fixi https://github.com/bigskysoftware/fixi Finally, we are working on introducing general transclusion into the HTML spec itself with the triptych project: https://github.com/alexpetros/triptych https://github.com/alexpetros/triptych however that is a ways off (if ever)