FEU login with jQuery/Ajax

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
cyrcle
Forum Members
Forum Members
Posts: 23
Joined: Fri Jan 06, 2017 3:54 pm

FEU login with jQuery/Ajax

Post 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.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: FEU login with jQuery/Ajax

Post 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.
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
Post Reply

Return to “Modules/Add-Ons”