Autocomplete with Hidden ID

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Autocomplete with Hidden ID

Mark Romano
I'm looking to create a search field with autocomplete that retrieves  
contacts along with a hidden id field. I found a link on the web that  
utilizes jQuery UI, but I haven't been able to modify the code to work  
with lasso (the link example uses cold fusion). Any help here would be  
greatly appreciated. Thanks.

Here's the link: http://www.petefreitag.com/item/756.cfm

Mark

p.s. I'm also open to other solutions that will accomplish same result .

#############################################################
This message is sent to you because you are subscribed to
  the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
To switch to the DIGEST mode, E-mail to <[hidden email]>
To switch to the INDEX mode, E-mail to <[hidden email]>
Send administrative queries to  <[hidden email]>

Reply | Threaded
Open this post in threaded view
|

Re: Autocomplete with Hidden ID

Brad Lindsay-2
On Feb 26, 2011, at 12:01 PM, Mark Romano <[hidden email]> wrote:

> I'm looking to create a search field with autocomplete that retrieves contacts along with a hidden id field. I found a link on the web that utilizes jQuery UI, but I haven't been able to modify the code to work with lasso (the link example uses cold fusion). Any help here would be greatly appreciated. Thanks.
>
> Here's the link: http://www.petefreitag.com/item/756.cfm

I have successfully used the autocomplete plugin for jQuery that the jQueryUI autocomplete is based on. Looking at the link, the backend code is similar to things I have done. You'll need to create an array of maps in Lasso. Then you'll need to set the [content_body] to be a JSON encoding of that array.

Here's some pseudo code to get you started.
(Not, you'll need the JSON tags installed so that you can call [encode_json])

<?LassoScript
  var('result') = array;
  inline(...);
  records;
    $result->insert(map('id'=field('id'), 'value'=field('name'));
  /records;
  /inline;

  content_body = encode_json($result);
?>

HTH
Brad

#############################################################
This message is sent to you because you are subscribed to
  the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
To switch to the DIGEST mode, E-mail to <[hidden email]>
To switch to the INDEX mode, E-mail to <[hidden email]>
Send administrative queries to  <[hidden email]>

Reply | Threaded
Open this post in threaded view
|

Re: Autocomplete with Hidden ID

stevepiercy
In reply to this post by Mark Romano
See:
http://lasso.2283332.n4.nabble.com/autocomplete-multiple-with-jquery-tp3150930p3150932.html

and:
http://lasso.2283332.n4.nabble.com/OT-jQuery-Autocomplete-Migration-Guide-td3139886.html

--steve


On 2/26/11 at 9:01 AM, [hidden email] (Mark Romano) pronounced:

>I'm looking to create a search field with autocomplete that
>retrieves contacts along with a hidden id field. I found a link
>on the web that utilizes jQuery UI, but I haven't been able to
>modify the code to work with lasso (the link example uses cold
>fusion). Any help here would be greatly appreciated. Thanks.
>
>Here's the link: http://www.petefreitag.com/item/756.cfm
>
>Mark
>
>p.s. I'm also open to other solutions that will accomplish same result .
>
>#############################################################
>This message is sent to you because you are subscribed to
>the mailing list <[hidden email]>.
>To unsubscribe, E-mail to: <[hidden email]>
>To switch to the DIGEST mode, E-mail to <[hidden email]>
>To switch to the INDEX mode, E-mail to <[hidden email]>
>Send administrative queries to  <[hidden email]>
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


#############################################################
This message is sent to you because you are subscribed to
  the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
To switch to the DIGEST mode, E-mail to <[hidden email]>
To switch to the INDEX mode, E-mail to <[hidden email]>
Send administrative queries to  <[hidden email]>