Javascript search function?

I

IUnknown

Hello,

I have several 500+ page HTML books that I am creating a desktop
viewer application for. The client has asked for a search function,
which shows a list of search hits with context information and can
take the user to the specific point in the book where the match
occurred.

I can create a search function that shows a list of hits no problem.
Just use document.body.innerText and then do a string search. Problem
is, I don't know how to scroll the specific text into view using IE.
Any suggestions? I have Javascript and VBScript available to me in
the browser. The browser is hosted in a C++ Windows application. A
solution with any of those languages is fine by me. I can also use
something that works off a pre-built index, but what should the index
contain to allow me to quickly scroll the element into view?

I have looked at several "client-side search engines" that are pimped
on the web. All that ones I found either cannot scroll to the exact
position where the hit occurred, or they require that I use their
"search application" instead of giving me an API so I can make my own
front end. Is anyone aware of a third-party solution that doesn't
have either of these problems?
 

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
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top