Loading ...
Sorry, an error occurred while loading the content.
 

How to Link Autocompletes

Expand Messages
  • Peleg
    Based on the selection in one Autocomplete (AC), I want to filter what will be shown in another. For example,the first AC lists makes of autos and the second
    Message 1 of 1 , Feb 4, 2009
      Based on the selection in one Autocomplete (AC), I want to filter what will be shown in another. For example,the first AC lists makes of autos and the second is supposed to list models of only that make. So, for example, if a person selects Ford from the first, the second should list only models of Fords. I've got everything working, even the CGI to scrape the rows out of the database, but I can't link the second AC to the first. It seems like a common operation -- it is done in MS Access all the time, and it's as easy there as falling off a log because you can dynamically adjust the row source of the second based on what was selected in the first -- so I expected there would be a way to do it in with a pair of AC's.

      What I think I need to be able to do, and haven't found a way after much trial and searching, is to adjust the query string of the second AC, but I can't find a way to manipulate the string before the request is sent to the server. generateRequest doesn't work because it seems to be creating a static string. I can't find an event that fires before the request is sent that also gives me write-access to the query string.

      Does anybody know what I need to do?

      Thanks,
      Paul S.
    Your message has been successfully submitted and would be delivered to recipients shortly.