Forum Moderators: coopster

Message Too Old, No Replies

New "search for" feature on PHP Home Page

I like it!

         

coopster

2:14 pm on Dec 31, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Has anybody else noticed the update to the PHP "search for" feature on their page header? Travel on over to [php.net...] and check it out.

First, make sure "function list" is selected in the "in the" list right next to the "search for" option. Then when you start typing in a function it automagically narrows the list based on letters entered. Sweet. I had a quick peek behind the scenes and the workhorse is a piece of js that I haven't had time to analyze yet:

[php.net...]

Truly a neat feature and time saver! I like it.

dreamcatcher

2:22 pm on Dec 31, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Wow, that really is cool. Now how long will it be before someone posts asking how I do that with PHP? ;)

claus

2:31 pm on Dec 31, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's the same thing they do with Google Suggest - after Gsuggest it pops up all over the place.

It's called a XMLHttpRequest - google for that+javascript :)

Added: Here's an apple developer article on it (not apple specific):
[developer.apple.com...]

jatar_k

4:58 pm on Dec 31, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I am really liking that new function, the only thing I don't like is it doesn't save the search if I select from the list as it does when I actually search for a function.

coopster

5:25 pm on Dec 31, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Although this is dated a few days ago, I don't recall seeing this on the home page until today...


Function list suggestions available

[27-Dec-2004] Surely, some of our visitors are back at work for a few days between holidays, and hopefully they will find our post-christmas gift useful. The function list suggestions we started to test a year ago seemed to be working better as some bugs were found and fixed, so it was time to make the result available on all php.net pages.

Whenever you type something into the search field, while having the function list search option selected, you will get a list of suggested functions starting with the letters you typed in. You can browse the list with the up/down keys, and you will be able to autocomplete the function name with the spacebar.

If you are not interested in this feature, you can turn it off for yourself on the My PHP.net [php.net] page. More information [php.net] about is available on the search page.

So, you could turn it off if it doesn't suit your taste. However, I don't understand what you mean by the search not "sticking". It stays in my list when I arrive at the function page I searched and clicked on...

coopster

5:43 pm on Dec 31, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



BTW, the source code for all this is available. Follow the link on the "More Information" link (above and on the PHP site) to get to the CVS [cvs.php.net].

I never realized Google Suggest was out there. That's nice too. They don't carry the entire block of "partially matched" items into the following page like PHP does (view source once you have clicked and landed on a function page). I also like the background color change on mouseover at Google. PHP only does that on a cursor roll via keyboard arrow keys (in my browser at least).

ergophobe

9:11 pm on Dec 31, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I first noticed it because I was searching for something other than a function and it kept messing up my typing. It took me a second to figure out why it wasn't letting me put my search term in.

coopster

9:18 pm on Dec 31, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



hehe. yep. If you want to search the "whole site", you need to specify that first by selecting it in the "in the" list right next to the "search for" option.

claus

4:29 pm on Jan 1, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>> it doesn't save the search

It's a tradeoff. Normally, when IE encounters an input field with a name it has seen before it will display the combined input history for all fields with that particular name. Some other browsers do the same thing. ALT+ArrowDown usually calls this list, as well as starting to type.

The thing is - if you make a div appear that looks like this autocomplete feature, and is positioned at the same place, those two features will clash. So, browser autocomplete must be turned off first.

You do that by adding autocomplete="off" to the input field code, btw.