Help!

Wanted: A JavaScript Search Box

 
  

Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Web Developers RSS
Next:  Wife problems  
Author Message
VICE



Joined: Jan 02, 2005
Posts: 9



PostPosted: Sat Mar 10, 2007 5:29 am    Post subject: Wanted: A JavaScript Search Box

I am looking for a javascript search box that can search for web pages hosted locally, or in a specified directory.

Example: [ Sports ] : (Search) ,

Which would return a Sports.html page when [ Sports ] is typed in the text string and (Search) is clicked.

I have tried a drop down box, but it doesn't seem to fit the style of page that I am writing, and I would really like to use this search type box.

Can Anyone Help?

Many TIA

VICE
---------
Back to top
seaeagle



Joined: Aug 31, 2004
Posts: 5764

Location: Sydney, Australia

PostPosted: Thu Mar 22, 2007 9:11 pm    Post subject: Re: Wanted: A JavaScript Search Box [Login to view extended thread Info.]

Topic moved from Software Coders to Web Developers
Back to top
TrishaM



Joined: Dec 12, 2002
Posts: 886



PostPosted: Wed Apr 25, 2007 1:52 pm    Post subject: Not javascript, but a darn good site search script [Login to view extended thread Info.]

Hi - I know you said you're looking for a javascript function for this, but for years I've been using FDS Search Engine (both free and paid versions are available) which is Perl/CGI.

You can check it out here: FDSE Search Engine

The free version is a good way to try it out, but it has a link back to the developer's site which you can eliminate by buying it.

Fair warning - although it works great, it does take a bit of effort to get it installed and configured - which if you're fairly computer/code/web development savvy shouldn't be too tough (it's just probably not best for web design n00bies). If you're comfortable modifying it's header/footer files, then you can customize the "results" page so it matches the look and feel of your site and provides a seemless search results experience for your visitors. Also, if you have a really large site it might take a while to index all your pages. It's a good idea to reindex periodically if you make frequent site changes and add pages.

I highly recommend it, but perhaps someone else will be able to suggest a javascript one for you....
Back to top
tyler785



Joined: Mar 08, 2008
Posts: 2



PostPosted: Sat Mar 08, 2008 1:01 am    Post subject: Re: Wanted: A JavaScript Search Box [Login to view extended thread Info.]

If those pages are not in a DB anywhere, and if you have php on your server then you could do some command line calls to get all pages that are in your documentroot and put them in an array.

Then you can use some javascript to search through your list and dynamically return results to you page. you can then build your HTML and write it back to the page using something as simple as

Code:
document.getElementById('mycontainer').innerHTML = '<div>my pages</div>';


if you need more help, let me know

Tyler
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Web Developers All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum