Hi Marius,

I'm not sure how the browsers handles their "save username and 
password"-functionality.
But it might be, that the browser needs the name and/or id attribute on the 
input fields.

You can set them manually, have a look at the following example (runs in 
playground):

var userField = new qx.ui.form.TextField();
var passwordField = new qx.ui.form.TextField();

var doc = this.getRoot();
doc.add(userField, {left : 100, top : 50});
doc.add(passwordField, {left : 100, top : 80});

userField.addListener("appear", function(e) {
  var domElement = this.getContentElement().getDomElement();
  domElement.name = "user";
  domElement.id = "user";
}, userField);

passwordField.addListener("appear", function(e) {
  var domElement = this.getContentElement().getDomElement();
  domElement.name = "password";
  domElement.id = "password";
}, passwordField);

Another workaround would be to use a HTML login page within a IFrame, that's 
placed inside your qooxdoo application. But then it would be hard to get the 
qooxdoo look and feel for this HTML login page and the fields.

Regards,
Andreas

> -----Ursprüngliche Nachricht-----
> Von: marius123 [mailto:[email protected]]
> Gesendet: Freitag, 7. Mai 2010 09:54
> An: [email protected]
> Betreff: [qooxdoo-devel] Getting browser to save user name and password
> 
> 
> Hi all,
> 
> I've been struggling a while now to getting various browsers (FF, IE,
> Chrome) ask the users whether to save the user name and the password typed
> into a login form. The login process should be done asynchronously, by
> using
> an AJAX request.
> 
> My first approach of building a qx.ui.form.Form in a standalone app wasnt
> recognized by any browser as a login form. I figured out that the reason
> for
> this might be the fact that qooxdoo doesnt render the qx.ui.form elements
> inside an html FORM tag, so the browsers are not aware that the two input
> fields are intended to be a login form.
> 
> For my second approach I created a separate qooxdoo inline application and
> placed it within a FORM tag inside a plain html page. The login process
> works as follows:
> 1. User types in usrname and pwd and clicks "login"
> 2. Qooxdoo sends AJAX request to server
> 3. Server response contains login information (whether login was
> successful)
> 4. If login was successful submit the form via the JavaScript
> submit()-method (the form target is a hidden IFRAME) and forward the
> browser
> to the main application page (using window.location.href)
> 
> The submitting of the form in step 4 causes at least Firefox to display the
> "save password?" bar at the top. But when calling the login form again the
> saved username and password are not inserted into the input fields again
> (autocomplete-attribute set to "on"). The other browsers actually dont even
> ask to save the password.
> 
> The only login form that I got the password savers of the browser to work
> with was a simple HTML page without qooxdoo.
> 
> Can anybody help? Thx
> 
> Marius
> --
> View this message in context: http://qooxdoo.678.n2.nabble.com/Getting-
> browser-to-save-user-name-and-password-tp5018207p5018207.html
> Sent from the qooxdoo mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------------
> ---
> 
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------

_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to