uajax - universal ajax forms

Updated: 28th December 2022
Tags: javascript

Finally I’ve released my self-made function that I like very much.

Source code Demo

This libray will make you form ajaxed. Read readme on github, but basically all you need to do is add scripts to anywhere in html

<script defer src="/uajax.settings.js"></script>
<script defer src="/uajax.js"></script>

And add class js-uajax-form to form you want to be ajaxed

<form method="post" class="js-uajax-form">
...

There are tons of options, check source code and demo

Source code Demo

Story of my library

Nearly two years ago (wow so much time elapsed), when bootstrap 5 alpha was published, I wanted to get rid of jquery. I found htmx, but honestly I didn’t like it. That pseudo syntax is meh for me.

So, with almost zero knowledge of javascript, I made a function to make form ajax with pure javascript. And while using it I liked it so much, that wanted to publish it. I posponed it a few months and then this year I’ve got distracted and didn’t have the mood for anything.

Anyway, a few weeks ago I finally got some courage to publish it. While making demo, etc I found out that folks now use js modules and some pretty awesome stuff. I got frustrated. So I wanted to publish it as a fancy npm package, but my skills are too low and I currenly don’t have the mood.