Welcome Guest, Not a member yet? Register   Sign In
[resolved] CSRF issue when ajax functions and normal forms are used on the same page
#5

(This post was last modified: 10-02-2020, 01:24 AM by kilden.)

I'm not sure but I think it didn't work. It's always like this :

1- I enter in my input (text) and take the focus
2- I type some text that making ajax request and updating my database
3- If I click then on a submit button (without ajax but also with CSRF), it reloads the page without making the action...
4- I have to re-click on the submit button so that the form works. (It is as if an ajax call with CSRF on CI4 desactivates traditional form)

I've tried to make a focus on an element of my page when I focusout the inputs... ( $(window).focus(); $('body').focus(); ) without success.
Reply


Messages In This Thread
RE: CSRF issue when ajax functions and normal forms are used on the same page - by kilden - 10-02-2020, 01:22 AM



Theme © iAndrew 2016 - Forum software by © MyBB