Autofill user / password in firefox

I created a form to submit in HTML format but for some reason user / password autocomplete doesn't work as I expect in firefox.

This is what happens in Firefox:

  • I give a username and password and click the login button.
  • Firefox will tell me if I want to remember the password. I click remember and the login works. (I made sure to delete all remembered passwords before running this test)
  • I log out and go back to the login page. I would have expected the username and password field to be filled in advance, but that is not the case (if FF only stored one custom / pw combi for a specific url, it automatically fills in that combination in your form)

Please note that I do not (want to) use cookies. I checked in the FF password manager that the username and password were indeed saved (they were)

Here is the code for this page:

<form name="login_form" id="login_form" autocomplete="ON" onsubmit="javascript:xajax_action_login(document.getElementById('user_name').value, document.getElementById('password').value); return false;">
    <div class="login_line">
        <div class="login_line_left">name</div>
        <div id="user_name_id" class="login_line_right"><input size="16" maxlength="16" name="user_name" id="user_name" type="text"></div>
    </div> <!-- login_line -->
    <div class="login_line">
        <div class="login_line_left">password</div>
        <div id="password_id" class="login_line_right"><input size="16" maxlength="16" name="password" id="password" type="password"></div>
    </div> <!-- login_line -->
    <div class="login_line">
        <div class="login_line_left"> </div>
        <div class="login_line_right"><input class="button" value="login" type="submit">
    </div> <!-- login_line -->
</form> <!-- login_form -->

      

What's wrong with my code? How can I get autocomplete to work in FF with my code?

Autocomplete works correctly, for example gmail. Every time I visit the gmail login page the email and password fields are filled in correctly. I do not use the "remember me on this computer" checkbox, so cookies are not used.

I would really appreciate your help. Jasper


Autocomplete update is included in firefox. I want to stay IE compatible.

0


source to share


4 answers


I figured out why it doesn't work. I am using ajax to insert an example html into a div container. Apparently firefox is very sensitive to this because (as mentioned earlier) my code actually works in IE.



+1


source


Whether the URLs are static or dynamic, autocomplete does not work with dynamic URLs, say your URL:

http: //www.domain.come/login.php? someDynamicVarLikeAdateOrSo = 12312


Then saving the password won't work, you have to use modrewrite or something to render the url as static in the browser

+1


source


First check if autocomplete is enabled in firefox.
Then try setting the "type" attribute of the textbox to "autocomplete". Details are given here

0


source


It looks like you have autocomplete="ON"

in the tag <form>

. Try changing this to autocomplete="ON"

, that is, remove the 'ON' capitalization.

0


source







All Articles