Page 1 of 1

FEU login with jQuery/Ajax

Posted: Fri May 25, 2018 4:10 pm
by cyrcle
Hello,
I'm using CMSMS 2.2.7 and FEU 2.10.
Everything works fine except when the user submits a wrong password. In this case, the server response don't contain the error message, but only the login form html code.

My jQuery code is this one:

Code: Select all

<__script__ type="text/javascript">
    var frm = $('#m795fcmoduleform_1');

    frm.submit(function (e) {
        e.preventDefault();
        $.ajax({
            type: frm.attr('method'),
            url: frm.attr('action') + "?showtemplate=false",
            data: frm.serialize()
        })
        .done(function(data){
                console.log('Submission was successful.');
                console.log(data);
        });
    });
</__script>
I don't understand why the login error message appears when the page is fully reloaded, but don't display when I go through an Ajax request.
Has anyone encountered this problem?
Thanks.

Re: FEU login with jQuery/Ajax

Posted: Fri May 25, 2018 4:15 pm
by Rolf
Is this an upgraded website, or new install?
In case of the first you have to update your templates with the latest security feature.