I don't see what the problem is and what you want help on. You have the code right there that essentially does what you want. You just have to build the server-side code to select only cities with the selected country and a match to the autocomplete text. ... or did you want someone to build all of that for you?
On Oct 1, 6:41 am, pragard <otn...@gmail.com> wrote: > Hi, i'm trying the jquery autocomplete from here > > http://docs.jquery.com/Plugins/Autocomplete > > On that page someone said that: > " > Often one autocompleted field depends on the value of another field. > In that case, the extraParams option can provide the necessary dynamic > parameter: > > Consider an example where the states-field reuses the value entered > into the country field > " > > And the examples was: > " > $("#states").autocomplete(url, { > extraParams: { > country: function() { return $("#country").val(); } > } > " > > What I'm trying to do is I made a combo box that contain country with > it's id, and I also have a input text that will do the autocomplete. > If I select one of the country from the combo box, I want input text > will show me, when I press some words with autocomplete function, all > of the city that include in that country (assuming I have it in my > database). > > What should I do? Can someone give me some examples? > > Thanks.