PDA

View Full Version : Javascript search engine



ivarh88
09-22-2008, 02:17 AM
Hi!

I'm fairly new to coding and got myself in a bit of a mess.

I have a page with two frames - a menu left and a frame it controls right.
Under the menu, there's a search box which also produces it's results in the right frame.

Now, the menu let's you navigate between several lists of products. The search obviously helping you find specific items in those very same product lists.

The problem lies in making an easy search engine.

I stripped the described part of the site and loaded it to this link:
http://koplikool.ee/~ivar/help/

It's mostly still in Estonian, but you should get the idea.

The search engine I already implemented is a bit crappy, but easily tweakable. It searches within the different list html files. You can try it by choosing some word in the lists and trying to search for it UNDER THE MENU.
The main search window in the right frame doesn't work at the moment.

If a positive search result it will present you with a link to the list. But how could I get the code to present the exact line of the list in which it found the searched word?

Could it somehow be tweaked so that whenever the search engine code finds a word it would present as result the <tr> around that word?

Meaning the whole line in a list html file in which it found the word?

All ideas are very welcome!! :confused:

ivarh88
09-22-2008, 02:16 PM
Does anyone at least have an idea what part of the code is responsible for getting results for search words?

And possibly some ideas how that part could be changed?

:(