Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Some Person
Some Person
4,218 Points

Which JS is best for search functionality?

Hi There,

I am trying to create a search database for various things.

I want to know which JS is good for search.

My concept:

Use 1 server side (php or node) to query a database (MySQL or MongoDB) for relevant answers. In between the data exchange is done via AJAX.

2 Answers

What exactly are you trying to use the JavaScript for? I'm wondering if you really even need it. For instance, you could just use an HTML form that sends post-data to the server, have PHP interpret the request, retrieve that data from the database, have PHP organize it, then have a page dynamically created with the results.

I'd only use JavaScript for this to enhance user interaction (provide errors to the user etc.).

Maybe I'm just misinterpreting what you want the "AJAX" to do.

Some Person
Some Person
4,218 Points

I wanted AJAX to display result in "instant" way. So I type few characters then I get result instantaneously...