#487 new
Gottfried Ganßauge

Forms stay disabled when an ajax request is cancelled

Reported by Gottfried Ganßauge | September 10th, 2013 @ 09:52 PM

To validate a form on my site I'm hooking the onsubmit event of that form.
That particular form is already remotized.
In my hook function I'm calling cancelXhr() when the form doesn't validate successfully.
Unfortunately the form stays disabled afterwards.

$(document).onReady(function() {
    var form = $('searchform');
    var q = $('query');

    form.remotize({ onSuccess: loadTitlelist });
    q.focus();
    form.on({'submit': function() {
        if (!q.value()) {
            form.cancelXhr()
            q.focus();
            seterror ('Please enter a query before trying to search');
        }
    }});
});

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

RightJS Core Tickets

Shared Ticket Bins

People watching this ticket

Pages