i am new in Django and this things, and i need some tips or solutions to adding spinner. Iam using spin.js, which i show it on this way:
var target = document.getElementById('spin');
var spinner = new Spinner(opts).spin(target);
spinner.stop();
function spin_stop()
{
spinner.stop();
}
function spin_start()
{
spinner.spin(target);
}
This code is copied from some example on web.
I show spinner with <div id...>
Now there is a problem.
I have an app in Django with name testScript. That app connects to different page to verify login information. This is "long" process, it takes about 10sec. In that time, i want on my login page add a spinner. In template i have a form:
<form class="form-signin" action="/testScript/" method="post">
and if i want to add onclick event in my button in this form, my spinner freeze.
How can i show spinner, when my testScript is processing?
Thanx