Hello,

I hope I post in the right place, otherwise hope someone can indicate
me a more apropriate place to post.

I am trying to use the nsILoginManager interface. However I face some
trouble to fill the form with nsILoginInfo.
Let's take the example of login into Facebook. the formular looks like
this



This is my javascript
// LoginManager
// create instance of LoginManager
var myLoginManager = Components.classes["@mozilla.org/login-manager;
1"]
.getService(Components.interfaces.nsILoginManager) ;
// create instance of LoginInfo
var nsLoginInfo = new Components.Constructor("@mozilla.org/login-
manager/loginInfo;1",

Components.interfaces.nsILoginInfo,
"init");

According to the doc (https://developer.mozilla.org/en/
XPCOM_Interface_Reference/nsILoginInfo), and the code I post above
(the html form) the loginInfo should look like this.
var facebookLoginInfo = new nsLoginInfo('http://
www.facebook.com','https://login.facebook.com', null,
username.value, password.value, 'email',
'pass_placeholder');
myLoginManager .addLogin(facebookLoginInfo);

The login infos are well added to the password manager. I can see
these info under tools|options|security.

Then I want to fill the formular, so I do a
myLoginManager .fillForm(currentDoc.getElementById("menubar_login"))

because the name of the formular for facebook is menubar_login

But nothing happens... The fields of the formular are not filled.

I don't understand why. I hope you can help me. I can't find any
example.
Regards