I have changed a little of my code and have gotten the onchange code
to run, but Internet Explorer does not hide the dropdown list after
selecting a value unless selected a second time. What can I do to
change this behavior?

var idList  = "<%=addIDStringBuffer.toString()%>";
var idArray = idList.split(",");

$(document).ready(function() {
  for(var i=0; i<idArray.length; i++) {
    $("#city"+idArray[i]).autocomplete(
      [
        <%=cityList.toString()%>
      ],
      {
        delay: 100,
        selectFirst: false
        max: 10,
        scrollHeight: 500
      }
    );
  }
});

Could someone please advise?

On Jan 17, 1:36 pm, Mark Thompson <[EMAIL PROTECTED]> wrote:
> Any Ideas?
>
> MarkThompson
>
> On Jan 15, 2:38 pm,MarkThompson<[EMAIL PROTECTED]> wrote:
>
> > I am trying to replace a previous bit of html that managed input by
> > both an input and a select box. I now want to work with a single input
> > field using
> > jquery.autocomplete.js, but I have not been able to getautocomplete
> > to use the onchange JavaScript code used by that previous bit of html.
> > I have gottenautocompleteto 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
> > andautocompletecode, and I am only moderately more familiar with
> > JavaScript.
>
> > 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()%>"; // This is a list
> > comprising a unique identifier, the "addID" (see html input box
> > above), for each address on the page.
> > var idArray = idList.split(",");
>
> > $(document).ready(function() {
> >   for(var i=0; i< idArray.length; i++) {
> >     $("#city"+idArray[i]).autocompleteArray(
> >       [
> >         <%=cityList.toString()%>
> >       ],
> >       {
> >         delay:10,
> >         autoFill:true,
> >         max:10
> >       }
> >     );
> >   }
>
> > });
>
> > MarkR.Thompson

Reply via email to