Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Forms stay disabled when an ajax request is cancelled

#487

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');
        }
    }});
});

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

State: new
Milestone: none
Assigned to: nobody

Activity

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.