Ok, thanks for those suggestions.  I'm only starting off with JQuery.
I hope to keep learning about it.  At present, the syntax is very
strange.

On Jul 10, 8:42 am, "Dan G. Switzer, II" <[EMAIL PROTECTED]>
wrote:
> >Ok, so you "da man" when it comes to this AutoCompleter?  I did try
> >the page from FF and it definitely worked.  Would you mind looking at
> >the code?
>
> >function findValue(li) {
> >    if( li == null ) return alert("No match!");
>
> >    // if coming from an AJAX call, let's use the CityId as the value
> >    if( !!li.extra ) var sValue = li.extra[0];
>
> >    // otherwise, let's just display the value in the text box
> >    else var sValue = li.selectValue;
>
> >    oItmDesc = document.getElementById("ItmDesc");
> >    oItmDesc.innerHTML = li.extra[0];
> >    oOnHandQty = document.getElementById("OnHandQty");
> >    oOnHandQty.innerHTML = li.extra[1]
> >    oPrice = document.getElementById("Price");
> >    oPrice.innerHTML = li.extra[2]
> >//  alert("The value you selected was: " + sValue);
> >}
>
> There's nothing that jumps out as something that wouldn't work in FF.
> However, you obviously have an error somewhere in your code. I'd recommend
> installing the Firebug plug-in for FF--it'll really allow you to dig deep
> into what's going on (you'll be able to run traces, see the results from
> AJAX calls, etc.)
>
> One thing I would recommend do in the above code is making use of jQuery.
> You're going back to DOM methods and missing out on the benefits of jQuery.
> The following could be re-written:
>
> >    oItmDesc = document.getElementById("ItmDesc");
> >    oItmDesc.innerHTML = li.extra[0];
> >    oOnHandQty = document.getElementById("OnHandQty");
> >    oOnHandQty.innerHTML = li.extra[1]
> >    oPrice = document.getElementById("Price");
> >    oPrice.innerHTML = li.extra[2]
>
> To:
>
> $("#ItmDesc").html(li.extra[0]);
> $("#OnHandQty").html(li.extra[1]);
> $("#Price").html(li.extra[2]);
>
> Not only is this a lot less code, it'll also make sure your code is cross
> browser compatible.
>
> -Dan- Hide quoted text -
>
> - Show quoted text -

Reply via email to