NetTalk Central

Author Topic: Autocomplete not working  (Read 5226 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Autocomplete not working
« on: April 26, 2018, 07:27:13 AM »
I have a string in a form with Autocomplet but it does nothing.
It is a string over a long field to select the Customer ID
Ive cheked with the profiler and the query is sent to the server OK but it does nothing.
Anything else I can check?
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Autocomplete not working
« Reply #1 on: May 02, 2018, 10:46:36 PM »
Hi Alberto,

Post an example of what you are doing.

But the most likely reason for the problem is that you don't have a single-component (preferably unique) key on your description field.

cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Autocomplete not working
« Reply #2 on: May 03, 2018, 03:24:23 AM »
Yes , there are a single component key of the field, not unique.
How to post an example having a multi dll solution over MsSql?
-----------
Regards
Alberto

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Autocomplete not working
« Reply #3 on: May 03, 2018, 06:43:46 AM »
Ive added code to the autocomplete routine and the names are fetched ok, any other thing to check??

 
  ! End of "AutoComplete Filter & Order"
  Set(OPE:Operador_OptionView)
  packet.append('[')
  Loop
    Next(OPE:Operador_OptionView)
    If ErrorCode() then Break.
    ! Start of "AutoComplete Drop Field Record"
    ! [Priority 5000]
                                                                                    p_web.AddLog(OPE:Nombre)
    ! End of "AutoComplete Drop Field Record"
    recs += 1
    packet.append(choose(recs=1,'',',') & '"' & p_web.JsonOK(p_web.AsciiToUtf(OPE:Nombre)) & '"')
    If recs >= 20
      Break
    End
  End
  packet.append(']')
  ! Start of "AutoComplete Before Closing the View"
  ! [Priority 5000]
-----------
Regards
Alberto

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Autocomplete not working
« Reply #4 on: May 03, 2018, 07:01:05 AM »
Using chrome ive detected theres an autocomplete p?roperty thats set to OFF
PLease see image
If I set it to ON it seams to work...

Then looking at the source code I found:

 ! End of "Set Value"
  If Not (1=0)  ! SecFieldHideStateRtn
    p_web.site.HTMLEditor = p_web.site.DefaultHTMLEditor
    ! --- STRING --- OPE:Operador
    loc:AutoComplete = 'autocomplete="off"'
    loc:readonly = Choose(loc:viewonly,'readonly','')
    loc:javascript = ''

What is SecFieldHideStateRtn ?

Weird thing is that the same code is generated fro the web3 example and it works evem woth autocomplete=off
« Last Edit: May 03, 2018, 07:09:36 AM by michelis »
-----------
Regards
Alberto

bshields

  • Sr. Member
  • ****
  • Posts: 392
    • View Profile
    • Inhabit
    • Email
Re: Autocomplete not working
« Reply #5 on: May 03, 2018, 04:46:18 PM »
Hi Alberto,

That is the browsers autocomplete (its the one that tracks what has been entered into this field previously). That is different from NetTalks autocomplete that compares what you type with values in your database.

Regards
Bill

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Autocomplete not working
« Reply #6 on: May 04, 2018, 02:41:02 AM »
Thanks, I dont know what else to check, its a plain field exactly like the one in the web3 example, the autocomplete options are filled ok but nothing happens.
-----------
Regards
Alberto