I am trying to replace a previous bit of html that managed input by
both an input and a select box with a single input field using
jquery.autocomplete.js, but I have not been able to get autocomplete
to use the onchange JavaScript code used by that previous bit of html.
I have gotten autocomplete to display and select all the values
correctly in multiple analogous fields on the same form, but I do not
know how to have it trigger the code that was previously run under an
onchange event. Unfortunately, I do not understand much of the jquery
and autocomplete code, and I am only moderately more familiar with
JavaScript.

I am sorry if this is somewhat of a duplicate message. I posted a
message last night under the same nickname, dustyt, but from a
different account, [EMAIL PROTECTED] I cannot now access the
group from this account (I can read messages--although I do not see my
posting from last night--but the group wants me to join before
posting, yet I am already a member) due to some weirdness with Google
and signing in. When I joined the group last night, it gave me access
to the Members, but now says that I must be a manager to do so or that
jquery_en is not a group. More weirdness.

Here is a bit of the current relevant code:
              <input class="text" id="city<%=addID%>" type="text"
name="city<%=addID%>" size="30" maxlength="120" value="<c:out value="$
{partyAddress.city}"/>" onchange="javascript: updatePartyAddress(this,
<%=addID%>);" >
...
var idList  = "<%=addIDStringBuffer.toString()%>";
var idArray = idList.split(",");

$(document).ready(function() {
  for(var i=0; i< idArray.length; i++) {
    $("#city"+idArray[i]).autocompleteArray(
      [
        <%=cityList.toString()%>
      ],
      {
        delay:10,
        minChars:1,
        matchSubset:1,
        onItemSelect:selectItem,
        onFindValue:findValue,
        autoFill:true,
        maxItemsToShow:10
      }
    );
  }
});



Perhaps something to do with selectItem is needed?
Any help would be appreciated. Thanks.

Mark R. Thompson

Reply via email to