• using AJAX to implement a live search ·

    I recently implemented a live search on the quotes page, so I figured I’d give a tutorial on how I did it. A “live” search is like a regular search feature, but if the user has Javascript enabled, the search will run as they type, instead of waiting for them to hit the ‘Submit’ button. There are a couple of advantages to this, one being that it’s a bit quicker than a traditional search because it starts working immediately; another advantage is that it might help you narrow down your search better (e.g. you initially want to search for ‘frogs’, but you get just ‘frog’ typed in and see results that interest you that wouldn’t have seen with a ‘frogs’ query). However, I think the main benefit from a live search is that it’s cool. :)

  • using AJAX to spiff up a gallery ·

    Lightbox is nice and all, but sometimes I find it clunky, particularly in Firefox when I have a lot of other tabs open. However, I don’t want to go the route of having an image load by itself in the browser, because it would be so much nicer to have it integrated into my layout. I could have a whole bunch of separate pages, one for each image, and do a full page load when a thumbnail is clicked, but that’s kind of a hassle. Well, with a simple PHP script and some AJAX calls, I can have my image load within the gallery page without a page reload.