A
A
Andrey Rogov2013-02-24 22:01:25
JavaScript
Andrey Rogov, 2013-02-24 22:01:25

How to update the list of autocompletions shown in chrome?

Problem like this:
Yes

<form autocomplete="on"><br>
<input name="user" id="myInput" list="myDataList" autocomplete="on"><br>
<datalist id="myDataList"><option value="val1"></option></datalist><br>
</form>
The user entered let's say "va", he is shown the autocomplete "val1".
Additional auto-completions can be defined on the server. Javascript ajaxed to the server for additional autocomplete options for "va" and added the appropriate ones &lt;option&gt;to &lt;datalist&gt;.
But until the user enters / erases another letter, additional auto-completion options do not appear in the auto-completion field.
Question: how to update the displayed list of autocompletions without user action?

Example (abstract).
Opera is similar to Chrome.
In Firefox - thanks to the focus hack - everything works.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
Timur, 2013-02-25
@XAKEPEHOK

Why not just use bootstrap-typeahead.js?

A
Andrey Rogov, 2013-02-25
@rogallic

missed

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question