simplify ajax request in forms and anchors, just by adding axer attributes
-
git clone https://github.com/hassanalisalem/ajaxer.git
-
Add
<script src="src/ajaxer.js"></script>
at the end of the file
- Add axer to the form or anchor eg:
<form axer ...>
. - axer attributes are :
axer-action
specify where to send the form data.
axer-action-result
specify where to put the response (it should take an id).
axer-loading
specify what is the id of the loading form.
axer-method
the method of your form.
axer-redirect
where to redirect the form or anchor after finish proccessing.
axer-before
the function name to call before start proccessing.
axer-after
function name to call after finishing proccessing.