开发者

Jquery autocomplete with dependent search values. How?

I was wondering if there is any way to use autocomplete with multiple param:true and to change dynamically the source based on the user selection.

For example:

The user typ开发者_如何转开发es the letter ‘C’ and the list returns the countries starting with ‘C’.

The user selects ‘China’.

Now the input contains the word ‘China’ followed by a comma.

Then the user types ‘B’ and the script changes the source to a city list based on the first term and returns Beijing.

To simplify this:

In the input field the first user’s selection comes from a source that contains countries, the second selection comes from a source that contains cities and so on…

It’s like trying to make dependable drop downs but in one autocomplete input filled with terms separated by comma…


I think that you can take the 'multiple values remote' sample (see demo) and change the source function.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜