1

Is it possible to make browsers prompt the "Show username and password" dialog when submitting a login form using AJAX?

<form id="login_form" type="POST">
    <h2 class="form-signin-heading text-center">Login</h2>
    <input type="email" id="email" class="form-control" placeholder="Username" required autofocus>
    <input type="password" id="password" class="form-control" placeholder="Password" required>
    <input type="hidden" name="login_token" id="login_token" value="<?php echo $token; ?>" />
    <button type="submit" class="btn btn-lg btn-primary btn-block" id="login"><i class="fa" id="login_user"></i> Login</button>
</form>

Take care of login on submit:

$("#login_form").submit(function(event)
{
    event.preventDefault();

    //AJAX LOGIN LOGIC...
});

It works fine to login, but the dialog showing "Save username and password" does not prompt. Is there anyway to "force" this behaviour?

Thanks for any help and guidance!

Araw
  • 2,410
  • 3
  • 29
  • 57

0 Answers0