I have an ajax based login form for my site and have noticed that browsers are not recognising it as a login form and are not remembering passwords for it to ease the user’s login.
When the submit button is pressed the values and sent to serverside to check and a response is sent back. If the check passes the the session is set and the page performs a javascript redirect into the members area. The html is very simple and could be the cause of the problem.
HTML:
<input type='text' class='email'>
<input type='password' class='password'>
<a class='submitBtn'>SUBMIT</a>
Thanks guys!
Found answer on stack : How can I get browser to prompt to save password?
My Version:
I can confirm that this triggers the password remember features for Chrome (other browsers not yet tested). It is important that the action attribute points to a
blank.php. I chose a blank php page and echoed out the$_POSTarray just to make sure that the values were being submitted via the form.I will now implement this with my old code that simply uses javascript to pull the values out of the field and checks them via an ajax call. I wonder if I can do away with the submit button all together and just use javascript to submit the form?