Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Javascript Search Engine

Status
Not open for further replies.

daph

Programmer
Jun 9, 2000
65
CA
Hey everyone!<br><br>I've been trying to figure out how to do a search engine that will only search in my web site. Now, here's my question...how could I make a search in the content of my html pages? Is that possible? Cause the search engines I found so far, they search in its own page for the descriptions, which are written by hand by the programmer. The web site I'm working on is way too big for that and it wouldn't be the best way to do things..So, if anyone has any ideas for me, I would really appreciate it. <br><br>Thanks guys! :)<br><br>daph
 
daph,
I dont think that you will be able to search through the content of your pages using javascript. If you have a large site then you would probably want to use a CGI script or something similar, although I am not sure whether these will be able to search the content of pages either(more likely though!).

I have actually made a javascript search facility on my site, but it is fairly limited. I am trying to include the use of '+' and '-' which is taking time.

What I have done is set up an array for the title of each page, an array for the description, and an array for the keywords.

When the user searches, it just runs through the arrays looking for a match.

Fairly basic, and may not be the best way to do it, but it's one way you can do it!!

If you need more help I would suggest trying the CGI forum.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top