[issue1443] Bug tracker web interface sometimes records submissions twice (with firefox)

free_coder free at localhost.localdomain
Tue Jul 28 16:05:49 PDT 2009


It seems I've solved the problem, the function must return a boolean type 
(false or true) and not just 0 or 1. That is:

function submit_once() {
    if (++submitted > 1) {
        alert("Your request is being processed.\nPlease be patient.");
        try {
            event.returnValue = 0;    // work-around for IE
        } catch (e) {}
        return false;
    }
    return true;
}

And it would be nice if we declare the "submitted" variable with "var", 
i.e. var submitted = 0;

cheers.





More information about the Bugs mailing list