Search Feature - How Did They Do That?

M

Merk

If you navigate to this URL, http://www.thebusco.com, you will see in the
upper left corner just below the masthead, a box where you can enter text to
initiate a search. The box is filled, by default with the text "Enter Part
Search Here". Do it and see what happens: enter some text, like "engine".
As you type into the box, another box appears and shows the closes matches
to the text AS you are entering..

I'm just totally dazzled and don't know enough about the Web to know if this
is something I could easily incorporate/duplicate in my own Web sites or
not... either the way they did it or any other way that gets me the
same/similar result.

General direction?

Thanks!
 
S

S. Justin Gengo

Merk,

Taking a look at their search.js page which is the javascript doing all the
work they are using the equivalent of AJAX (if it isn't ajax itself...)

Using Visual Studio.NET 2005's new AJAX objects you could do the same pretty
easily. If you're on .NET 2003 then there was just a post about some good
AJAX resources that are compatible with .NET 2003 posted by Karl Seguin in
the "Which AJAX library to use" post just a bit below this one.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 
P

Patrice

- Either the list is short and some local javascript extract the needed
information from embedded data (array, hidden table etc...) and show the
relevant part.
- For big lists, the javascript code could call a server side page (witjout
posting the page but by using XMLHTTP, an hidden frame or whatever else
similar) and retrieve the needed information that then shows up.

If this is the "AS you type" part, you do have key events available....

Patrice
 
B

Bruce Barker

its pretty simple. in client script they keep an array of all the values,
and use dhtml to update a div with the matching results as you type. they
even do the sorting on the client side.


-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top