<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
I don't know that autocomplete has any functionality for filtering. Perhaps there's a third party modification that accomplishes that; however, it should be relatively simple.<div><br></div><div>I haven't tested this, but you should be able to ask your database for the filtered data when your name field throws the blur event, and update the source option on the autocomplete component. If your data is all client-side, then you'll have to write a little JavaScript filter on your array.</div><div><br></div><div>It could look something like this:</div><div><br></div><div>var filterData = function() {</div><div>&nbsp; &nbsp;&nbsp;<span style="font-size: 10pt; ">$('input[name="address"]').disable().val('Loading addresses...'); // optional ui helper</span></div><div>&nbsp; &nbsp; $.ajax({</div><div>&nbsp; &nbsp; &nbsp; &nbsp; ...</div><div>&nbsp; &nbsp; &nbsp; &nbsp; success: function( data ) {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ( data.success ) {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span style="font-size: 10pt; ">$('input[name="address"]').enable().val( data.results[0] ); // optional ui helper</span></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $('input[name="address"]').autocomplete( 'source', data );</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; });</div><div>}</div><div><br></div><div>&lt;input type="text" name="name" placeholder="Please enter your name." onblur=filterData()&gt;&lt;/input&gt;</div><div>&lt;input type="text" name="address" placeholder="Please enter your address."&gt;&lt;/input&gt;</div><div><br></div><div><br></div><div>Something like that anyway. Hope that helps. This is probably the line you are looking for (in Smalltalk):</div><div><br></div><div><span style="font-size: 10pt; ">renderComponentOn: html</span></div><div><span style="font-size: 10pt; ">&nbsp; &nbsp; | someData | someData = [].</span></div><div><span style="font-size: 10pt; ">&nbsp; &nbsp; ...</span></div><div><span style="font-size: 10pt; ">&nbsp; &nbsp; (html jQuery: '#theAddressField') autocomplete optionAt: 'source' put: someData.</span></div><div><br></div><div>RS</div><div><br><div><div id="SkyDrivePlaceholder"></div>&gt; Date: Mon, 27 Aug 2012 06:35:41 -0700<br>&gt; From: lasmiste@gmail.com<br>&gt; To: seaside@lists.squeakfoundation.org<br>&gt; Subject: [Seaside] JQuery ui autocomplete with multiple parameters<br>&gt; <br>&gt; Hi there,<br>&gt;  I'm struggling with JQuery ui autocomplete. <br>&gt; I've a form with a couple of input fields: "name" and "address". Actually<br>&gt; autocomplete is running on the "address" field (I've a list of addresses and<br>&gt; names of my town), so far so good.<br>&gt; <br>&gt; Now, I'm gonna try to have an autocompletion of the "address" and "name"<br>&gt; coupled together, e.g. user fills the "name" field (e.g. John Smith) and<br>&gt; when he is starting to fill the "address" field, the returning values from<br>&gt; autocomplete should be the list of addresses of John Smith.<br>&gt; What I'm wondering is how to pass the value of the "name" field to the<br>&gt; autocomplete so that I can use "name" and "address" together in my query <br>&gt; Thanks<br>&gt;  Dave<br>&gt; <br>&gt; <br>&gt; <br>&gt; --<br>&gt; View this message in context: http://forum.world.st/JQuery-ui-autocomplete-with-multiple-parameters-tp4645397.html<br>&gt; Sent from the Seaside General mailing list archive at Nabble.com.<br>&gt; _______________________________________________<br>&gt; seaside mailing list<br>&gt; seaside@lists.squeakfoundation.org<br>&gt; http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside<br></div></div>                                               </div></body>
</html>