I found a workaround, but it isn't great. If I attach a .blur(handler) to the autocomplete field I can clear the related fields when the user leaves that field by checking for val()==''.
I'd love to hear that there is a way to do the same when mustMatch clears the autocomplete field. I'd like to clear the related fields immediately and not wait for the user to go to another field. On Aug 20, 2:45 pm, Brad <[EMAIL PROTECTED]> wrote: > Changing subject. > > I had originally entered "[AutoComplete] Detecting mustMatch failure" > and the forum ate "[AutoComplete]". > > On Aug 20, 2:40 pm, Brad <[EMAIL PROTECTED]> wrote: > > > I have a number of fields that are using the AutoComplete plugin > > instead of select menus. When a user enters and selects a match a > > number of other fields are populated via a .getJSON. > > > $("#f_orig_lookup") > > .autocomplete( > > "index.php", > > loc_lookup_obj) // loc_lookup_obj is a shared > > configuration object. > > .result(function(event, data, formatted) { > > if (data){ > > $.getJSON( > > > > "?type=remote&action=location_by_id&id="+data[1], > > function(data){ > > > > loadLocationInfo(data,'orig'); > > }); > > } else { > > // debug > > alert ('no data'); // <- THIS NEVER ALERTS > > } > > }); > > > The problem I have is this. A user does a lookup, then returns to the > > same field and enters non-matching text. The mustMatch causes the > > autocomplete field to clear, but the autocomplete .result doesn't > > fire > > > What I need to do is clear any pre-filled fields if mustMatch. Is > > there any easy way to detect that the mustMatch did it's job?