Ajax recommendation |
[eluser]SomeFunkyDude[/eluser]
I'm in the process of making an autocomplete using a jQuery plug-in with CodeIgniter. So far it works in FF/IE7/Safari, but not on the Mac browsers I tried. You can see an example here: http://starstryker.com/search_songs/inde...ong_search As you start to type, the jQuery script uses ajax to fetch a database model via get. There are over 30k karaoke songs, give it a shot. An issue I'm sort of having at the moment, is I'd like a less concise search if nothing shows up, as it is right now, using the database class $this->db->or_like(); it will try and match every letter typed, but I want to see if I can make it where if no matches are found, that it will search for parts of the word instead of the word as a whole. My next step, aside from broadening the search results if none are found, is I need to possibly make an a-z directory which will use pagination, and if possible, use ajax/jQuery to load details about the song into the page. Lemme know if you plan to use this jQuery plug-in, I ran into a couple snags I could probably help you with.
[eluser]jdfwarrior[/eluser]
[quote author="SomeFunkyDude" date="1239738284"]So far it works in FF/IE7/Safari, but not on the Mac browsers I tried.[/quote] Safari is a Mac browser. ![]()
[eluser]slowgary[/eluser]
I use jQuery also. I would recommend NOT hosting your own copy of jQuery, but instead letting Google host it. As people browse the web, they visit MANY sites that use these libraries. Unfortunately, at each site they must download a new copy of the JS. Instead, if every site just uses Google's copy, the user would already have these files cached. Additionally, it's one less thing your server has to deal with, saving you bandwidth. This is how it's done: Code: < script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.2.3/jquery.min.js' ></ script > @garycocs: jQuery.com has great documentation, if you have experience with JavaScript the examples will help you through it. @SomeFunkyDude: You should start a new thread for your fuzzy search requirements, but I think you can do something like that using either the soundex() function, or full-text search using "match against" (assuming mysql).
[eluser]jdfwarrior[/eluser]
[quote author="slowgary" date="1239739299"] Code: < script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.2.3/jquery.min.js' ></ script > Good point made. Something I do in every project I do. I have auto completes setup in PHPDesigner to do different things. Typing JQ (for JQuery) then Control + J (Auto Complete keystroke) auto inserts the google/jquery include for me.
[eluser]johnnybravoh[/eluser]
[quote author="jdfwarrior" date="1239739095"][quote author="SomeFunkyDude" date="1239738284"]So far it works in FF/IE7/Safari, but not on the Mac browsers I tried.[/quote] Safari is a Mac browser. ![]() Safari is available for Windows
[eluser]SomeFunkyDude[/eluser]
[quote author="johnnybravoh" date="1239753529"][quote author="jdfwarrior" date="1239739095"][quote author="SomeFunkyDude" date="1239738284"]So far it works in FF/IE7/Safari, but not on the Mac browsers I tried.[/quote] Safari is a Mac browser. ![]() Safari is available for Windows[/quote] not to switch topics, but i use safari/ie7/ff on my PC. and tested safari/ie5/ff on a mac as well. Most browsers are available as different versions for mac or pc.
[eluser]garycocs[/eluser]
[quote author="SomeFunkyDude" date="1239738284"]I'm in the process of making an autocomplete using a jQuery plug-in with CodeIgniter. So far it works in FF/IE7/Safari, but not on the Mac browsers I tried. You can see an example here: http://starstryker.com/search_songs/inde...ong_search As you start to type, the jQuery script uses ajax to fetch a database model via get. There are over 30k karaoke songs, give it a shot. An issue I'm sort of having at the moment, is I'd like a less concise search if nothing shows up, as it is right now, using the database class $this->db->or_like(); it will try and match every letter typed, but I want to see if I can make it where if no matches are found, that it will search for parts of the word instead of the word as a whole. My next step, aside from broadening the search results if none are found, is I need to possibly make an a-z directory which will use pagination, and if possible, use ajax/jQuery to load details about the song into the page. Lemme know if you plan to use this jQuery plug-in, I ran into a couple snags I could probably help you with.[/quote] Hmmmm reckon one of my sites KaraokeYouTube.net could use something like that ![]()
[eluser]bretticus[/eluser]
[quote author="garycocs" date="1239728699"]Ya having a read up about it now, any good sites you could recommend for some tutorials?[/quote] This is an excellent video series (Hopefully, the blog site will be more responsive by the time you read this.) jquery for absolute beginners video series
[eluser]garycocs[/eluser]
@bretticus: Thanks for that, reckon they'll be a great help to me. Was reading up a bit about it last night and (touch wood)it doesnt look that complicated.
[eluser]garycocs[/eluser]
One question I would have is, can you make a site too ajaxy? I know it doesnt help SEO and I'll have to spend a fair bit of time working on the code for no JS as well as JS. |
Welcome Guest, Not a member yet? Register Sign In |