Autosuggest/input Question?

Ok, I have and autosuggest input field. What I need to happen is the if I began to type in the autosuggest and select something from the suggested list, i’d like to fill in other input fields based on what was selected in the autosuggest field.

I could be wrong, but I don’t know if you can detect when something’s selected (w/the built in stuff). For that kind of control, you might want to look into using jquery. With the builtin stuff, I think the best you could do is bind other fields to the input box. But that means the values would be also be updated when the user types something. Not just when they select something from the autosuggest field.

Looking around more, you might be able to use the ajax proxy.

	someFunction = function(newValue) {
		var elem = document.getElementById('y');
		elem.value = newValue;
		elem.disabled = true;
	<cfinput type="text" id="x" name="x" autosuggest="foo,bar,widget">
	<cfinput type="text" id="y" name="y">
<cfajaxproxy bind="javascript:someFunction({x@change})">

I think I have it working the way I want it to… I used binds. One thing I would like to try to do is disabled specific fields (grey them out) if something is selected from the autosuggest. I want the user to be able to update some fields, just not all of them.