> > Hello everyone,
>
> > I would like to use Ajax.Autocompleter as suggestions, i.e. not
> > automatically select the first entry. How can I do that?
>
> Ok, it seems this is simply not possible...
Here is what I do:
<p>Choose Search criteria:</p>
<p>
<select name="type" id="type" size="5" onchange="changeInput()">
<option value="name">First Name</option>
<option value="lastname" selected="selected">Last Name</option>
<option value="email">Email</option>
<option value="country">Country</option>
<option value="country_iso">ISO Country Code</option>
</select>
</p>
<div class="headline-spacer"></div>
<p>
<input type="text" value="" id="criteria" name="criteria"
style="width:200px" />
</p>
<!-- autocompleter: begin -->
<div id="autocomplete_choices" class="autocomplete"></div>
<script type="text/javascript">
//<![CDATA[
var contact_name_auto_completer = new
Ajax.Autocompleter('criteria',
'autocomplete_choices', '/jsp/search_autocompletion.jsp', {minChars:
2 ,indicator: 'loader', paramName: "input", callback: function
(element, entry) { return entry + "&" + Form.Element.serialize
("type"); }, choices: 10, partialSearch: true, fullSearch: false})
//]]>
</script>
<!-- autocompleter: end -->
Is there a way to do get at onComplete for the Ajax Request like for a
standard Ajax.Updater?
I tried onComplete: function(){alert("test");} but that is not fired.
According to the scriptaculous wiki, updateElement and
afterUpdateElement are called after the user has selected an Entry.
The callback is used before the request is sent to the server. Is
there an event somewhere in the middle which I could use?
Barring that, is there an alternative to use?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---