I have this standard form with User name / password.
When I go to my webpage with the browser I end up in this form and it’s empty. When I click the Name field it will autofill with a suggested option. So far so good.
On the input fields there is an oninputinput () handler function that calls the backend in PHP with jquery $.ajax in tophp (POST).
This is the issue. Both Name and Password are set with autofill but only the password ends up at the backend PHP. To be stored in the session. The request that will store the Name is lost. So when submitting this form the session doesn’t find the Name and it will give an error.
I find that the $.ajax call with the value for the Name input field is not fired. It’s lost somewhere and I don’t know why. Here is my code:
And here is the console.log after the autofill takes place. The first call is added to the timeout variable but never fires.
Any clue as to why the request is lost? This happens when I load the page. When I manually type Name and login, then logoff and use autofill, it will work accordingly. Both requests are written into the session.