Welcome Guest, Not a member yet? Register   Sign In
Autocompleter without unique id
#7

[eluser]slowgary[/eluser]
The easy way would be to just loop through your inputs and create a new ajax.autocomplete object foreach. I know jQuery provides an easy way to select elements based on ID, I haven't used script.aculo.us for a while so I'm not sure if it has the same. Ideally you could just slap a class on any input you want to be auto-complete, then just iterate through them and attach the event binding.

My guess as to why script.aculo.us requires you to call the function separately for each input is that each input may have a different 'dictionary' of values to autocomplete from (states, countries, names, shoe size, etc.)


Messages In This Thread
Autocompleter without unique id - by El Forum - 04-29-2009, 09:53 AM
Autocompleter without unique id - by El Forum - 04-29-2009, 10:53 AM
Autocompleter without unique id - by El Forum - 04-29-2009, 11:01 AM
Autocompleter without unique id - by El Forum - 04-29-2009, 11:05 AM
Autocompleter without unique id - by El Forum - 04-29-2009, 12:07 PM
Autocompleter without unique id - by El Forum - 04-29-2009, 12:18 PM
Autocompleter without unique id - by El Forum - 04-29-2009, 12:44 PM
Autocompleter without unique id - by El Forum - 04-29-2009, 01:01 PM



Theme © iAndrew 2016 - Forum software by © MyBB