This is very cool. Better than Live Search. I might be able to implement this, and even include the abililty to get multiple pages worth of results.
And, it should be possible to do it so the search results appear in the sidebar, too. I’ll definitely look into this one.
(Thanks Kreaper!)
As far as I can tell, I should be able to hijack the POST/GET command, and get the file using XMLHttpRequest. Then I can use the data that is returned by putting everything (except the code up to and including
<body>and the code starting with</body>) into a new HTML element, that isn’t really part of the document.Then, I can use JavaScript to grab the elements that have the required class, and create a list of title/url pairs that can be placed into the dynamically appearing results list.
I’m really quite excited about this. I hope I have some time to do it this week.
I might come up with some other ideas that use AJAX to do cool stuff on the blog, too.
24 minutes after the fact.
Gracias Amigo! ‘Cause my understanding of the smarty/blogsome template system is very basic, I spent a whole day just trying to undertand the workflow…
My original thought for blogsome’s ajax search was just what you explained.
Keeping with my blog’s theme of blind up/down menus, once the search is conducted (I also agree with Elliot that a search should not be performed the moment someone types a letter…), the results window can be in a “blind down” box…
I would be concered about the weight of the page as a result of this JS hackery tho…
7 hours, 26 minutes after the fact.