Paul Would you please update your tutorial. having live search would be a great feature.
There has been a new js file. But since I didn’t know how to use it I used the old one and now I’m getting notices:
Notice: Only variables should be assigned by reference in /…/core/core.functions.php(570) : eval()’d code on line 8
Would you please check the new JS and update the tutorial?
Thank you in advance =)
Hiya,
Sorry to drag this up again as well but was trying this today on a site and have it working in so much as it returns whatever I type in as a list which is what I want and I can even use the up and down arrows on the keyboard to select what I want. That is when it all goes wrong :-(
If I use the up and down arrows and then press enter on one of the suggestions then I am taken to :
http://www.mysite.com/index.php?q=text
whereas I would like to be taken to the same place as I would be taken if I instead just clicked on the link (this works) - something more like:
http://www.mysite.com/item/detail/text
Anyone any ideas how to get this to work. I know that the site that was originally referenced has now changed their Javascript file slightly but it does seem to still work except for the up and down of arrows part.
Any help would be greatly appreciated.
Best wishes,
Mark
As an update to this actually I am not even getting the word text being placed into the URL. If I started typing text say I only typetex and I see the item I want then if I arrow down to it then it places :
http://www.mysite.com/index.php?q=tex
which wouldn’t be of much use to me anyway as it wouldn’t find what I need. Does anyone know how you get this to work so that it makes it go to the correct page?
On the original site it works and I am pretty sure that there isn’t anything else clever going on with their site, well not from what I can see anyway.
Thanks for any help on this.
Best wishes,
Mark
In search for something similar for EE, I saw that Wordpress has a great livesearch script.
Elliot Swan’s Better-Than-Live Search script for Wordpress
The coolest one I have ever seen is on prisjakt.nu. I am sure this could be something the EE staff might consider implementing for the next version (hint hint). 😊
With the help of Paul’s original code and the autocomplete plugin, I’ve made it work. [demo]
I’ll clean it up and make a plugin once the jquery docs are back up.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.