It worked!
Thank You!

On 31 maio, 10:22, "Dan G. Switzer, II" <[EMAIL PROTECTED]>
wrote:
> >Hello!
>
> >First thing: I'm starting in jquery and my english is poor. :P
>
> >I'm using Django + jquery autocomplete mod (http://www.pengoworks.com/
> >workshop/jquery/autocomplete.htm) and it's working fine, but one thing
> >doesn't works: the hidden value.
> >For example, my string is "Tulio|123\n" where "Tulio" is the displayed
> >information and "123" is (or not?) the hidden information.
> >I only catch the information "Tulio" and I'm trying to catch the
> >hidden information ("123") whithout success.
> >Can You help me about this?
>
> You need to specifically write code to copy. If you look at the example at:
>
> http://www.pengoworks.com/workshop/jquery/autocomplete.htm
>
> you'll see that it binds 2 functions to the autocomplete plug-in which are
> used for detecting the hidden value:
>
> 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;
>
>         alert("The value you selected was: " + sValue);
>
> }
>
> function selectItem(li) {
>         findValue(li);
>
> }
>
> You can use those functions are blueprint for your code (just replace the
> alert() in the findValue() with the code to update your hidden form field.)
>
> Also, you need to remember to bind this functions to the onSelectItem and
> onFindValue callbacks.
>
> -Dan

Reply via email to