In Scriptaculous Ajax autocomplter it chooses the first entry by default . how do i stop it from choosing the first option by default??
In Scriptaculous Ajax autocomplter it chooses the first entry by default . how do
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In controls.js of the Scriptaculous library, on line 286: change ‘this.index = 0;’ to ‘this.index = -1;’. That will fix your problem.
It’s a pain that there’s no option along the lines of { autoSelectFirst: false }. Hopefully in a future release 🙂
On another note, you might want to have a look at: http://docs.jquery.com/Plugins/Autocomplete
which lets you disable selecting the first option out of the box.