NetTalk Central

Author Topic: AutoComplete  (Read 3064 times)

Djordje Radovanovic

  • Full Member
  • ***
  • Posts: 237
    • View Profile
AutoComplete
« on: December 20, 2013, 06:02:44 PM »
I implemented AutoComplete one of my form. It works nice but I have a little tiny problem. After selecting one of AutoComplete value I could not catch embed point after that. Even if I declared more field assignments nothing happend.

How can I catch where to put code after choosing value from AutoComplete?

Best regards,
Djordje Radovanovic

Djordje Radovanovic

  • Full Member
  • ***
  • Posts: 237
    • View Profile
Re: AutoComplete
« Reply #1 on: December 21, 2013, 11:18:54 PM »
When I disable "Send every keyperss to server" it works as I expected but no char validation is possible.
Ok. Maybe I expected to much .

Best regards,

Djordje Radovanovic

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: AutoComplete
« Reply #2 on: December 22, 2013, 09:59:00 PM »
Morning Djordje,

>> I implemented AutoComplete one of my form. It works nice but I have a little tiny problem. After selecting one of AutoComplete value I could not catch embed point after that. Even if I declared more field assignments nothing happend.

You should get a normal "field completed" event - which calls the normal server side code when an auto-complete item is selected.
The only place I've seen with a problem is where you type the whole field correctly, but then select the (presumably only) auto complete record left. In JavaScript this doesn't generate a Change event, which is a bit of a pain. The work-around I had for this broke other code, so that was removed and the problem is on the "to do" list.

>> How can I catch where to put code after choosing value from AutoComplete?

Normal embed point (Server side code - validate::fieldname routine) should be fine.

>> When I disable "Send every keypress to server" it works as I expected but no char validation is possible.

I'm not 100% sure what you mean by the last part - explain that a bit more please.

Incidentally if you have auto-Complete on then the key presses are going to the server, but are being intercepted by the auto-complete code. I don't think "every key press" and "auto-complete" are both able to work without interfering with each other - but let me know more about what you are trying to do and I can always see if it's possible.

cheers
Bruce



Djordje Radovanovic

  • Full Member
  • ***
  • Posts: 237
    • View Profile
Re: AutoComplete
« Reply #3 on: December 23, 2013, 05:14:49 PM »
I have one specific field with not an ordinary behavior. Field may lookup record from database but it is not necessary. If field exist in database than it should show some other fields on page if it not exists in database I have to let user to insert value in every field and validate those data upon some algorithm.

Where is the catch? This field should only accept Base32 chars (only upper letters and some of numbers) and it is rather long field so I intend to validate every char user type but if the user enter whole field exactly as it exist in database than I never receive Change event and I am not able to show other fields from database.

I hope now you can understand what was my problem but If it's make trouble to you never mind. As I said "Maybe I expected to much"

Best regards,

Djordje Radovanovic