Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
User/password Autofill
#3
(03-21-2018, 08:25 AM)Alexandre Machado Wrote: This issue is a little more complicated than it seems.
First, each browser implements its own logic to deal with it and prompt the user to save username/password.

In Firefox and IE you need to put a button with type submit, otherwise it will never prompt for it. In order to do that you can use OnHTMLTag event of a button, to change its type to "submit":


Code:
procedure TIWForm28.LoginHTMLTag(ASender: TObject; ATag: TIWHTMLTag);
begin
  if SameText(ATag.Tag, 'input') then begin
    ATag.Params.Values['type'] := 'submit';
  end;
end;

However, in my tests WebKit-based browser still fail to prompt even if all requirements are satisfied. I'm running some tests now and should have more info soon. 

Yah after digging a bit into this before I went to bed, it appeared more complicated than I had wished, even with doing things in the "traditional" manor of web development.
Reply


Messages In This Thread
User/password Autofill - by cpstevenc - 03-21-2018, 04:41 AM
RE: User/password Autofill - by Alexandre Machado - 03-21-2018, 08:25 AM
RE: User/password Autofill - by cpstevenc - 03-21-2018, 03:15 PM
RE: User/password Autofill - by Jose Nilton Pace - 03-21-2018, 09:36 PM
RE: User/password Autofill - by davenovo - 03-23-2018, 03:29 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)