autocompletion js generalisee