NetTalk Central

Author Topic: autofill NOT causing an ACCEPTED event for fields  (Read 3821 times)

lanmicro

  • Full Member
  • ***
  • Posts: 112
    • View Profile
    • Email
autofill NOT causing an ACCEPTED event for fields
« on: July 26, 2007, 03:50:31 PM »
Hi Guys,

I am having a problem with fields being filled in with Internet Explorers autofill capability.  They appear filled in on the screen, but the validate routine is not being executed.  I have the "Send New Value To Server" check and the "refresh Value" on change checked. 

What am I missing?
Gregory C. Bailey

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11191
    • View Profile
Re: autofill NOT causing an ACCEPTED event for fields
« Reply #1 on: August 02, 2007, 07:59:58 AM »
Hi Greg,

I've done some googling on this issue, and it appears to be a problem mostly with IE (all versions), but also with Firefox 2.0 (FireFox 1.5 and earlier seem to be ok.)

[The firefox bug report is here
https://bugzilla.mozilla.org/show_bug.cgi?id=359387
As of 2 August 2007 it hasn't been fixed, but if someone browses this thread, feel free to check, and let us know if it has been fixed.]

There are some suggested work-arounds, but most of them come with fairly unwelcome side effects. The common solution seems to be to make use of autocomplete="off" for that field. (I'll most likely do this automatically for you for dynamic fields if the user is using IE or FF2 in 4.29)

Cheers
Bruce

lanmicro

  • Full Member
  • ***
  • Posts: 112
    • View Profile
    • Email
Re: autofill NOT causing an ACCEPTED event for fields
« Reply #2 on: August 03, 2007, 11:11:44 AM »
Hi Bruce,

Found out how to make it happen! 

At the end of the CreateInput method I changed the line:

returnValue = clip(ReturnValue)&'></input>'

to

returnValue = clip(ReturnValue)&' AUTOCOMPLETE="off"></input>'

this adds the AUTOCOMPLETE="off" to each input string and prevent autocomplete from working.

Now I get my accepted event and can continue. 

Thanks for the nudge in the right direction.
Gregory C. Bailey

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11191
    • View Profile
Re: autofill NOT causing an ACCEPTED event for fields
« Reply #3 on: August 06, 2007, 01:42:21 AM »
Hi Greg,

yes, that'll do nicely.

For 4.29 I've done sort of the same thing, except the code is a bit "smarter". It'll only do it (automatically) for "dynamic" fields (ie ones that are being sent back to the server and so are susceptible to the bug). It also allows you (on the template prompts) to specifically turn off auto-complete for some fields if you'd prefer it off.

Oh, and I made it automatically off for password fields as well.

Cheers
Bruce