S
S
Shmel_02011-01-28 15:46:20
JavaScript
Shmel_0, 2011-01-28 15:46:20

When using Jquery, browsers don't want to remember the username/password. Why?

On the site, a form for authorization is loaded in a certain block.
Loading is done using Jquery - $("#auth_panel").load('/actions/auth_panel/');
The form itself uses standard markup.
When entering a login and password into it, the browser offers to save the data for this form (only in FF, in IE and Chrome, and this does not happen), but when the page is reloaded (for example, after updating), the fields are not automatically filled in.
With what it can be connected?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey, 2011-01-28
@reaferon

It appears to be using jQuery.
1. onclick="go_auth(); return false;»>
Here return false; extra. Yes, and go_auth(); too, frankly.
Better to do:

$('#authform').submit(function(){
 $.post("/actions/user/auth/ajax/", 
   {'auth[login]': $("#auth_login").val(), 'auth[password]': $("#auth_password").val()}, 
   function(data) { if(data!='ok') { window.location = "/user/auth/"+data; } $("#auth_panel").load('/actions/auth_panel/'); }
  );
 return false;
});

and completely remove the onclick handler from the input

A
Andrey, 2011-01-28
@reaferon

Perhaps the text inputs are missing a name attribute?
If you send ajax data by id (which is not very correct), then this is possible.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question