[thelist] Can JS Search a Site

Michael Pemberton mpember at phreaker.net
Sun Apr 28 20:35:01 CDT 2002


Doug, this is the right logic to be using.  However, there are still
ways of making it possible.  To got JS to search a site, you must make
the index / search data available to JS.  This would require including
it in the page that you wish to execute the JS on.

This would mean building you index in such a way that ou would then
complete the search on the client side without overloading the user with
a large amount of redundent data.  This can be very hard to do.

Syed, what situation are you working in that requires a JS search
engine?  The solution may not require such an extreme step.

Douglas Rehg wrote:

>Someone else correct me if I am wrong, but since JS is normally executed
>on the client browser, not the server, you won't be able to search a
>site for the given words.  You could use Js for the page you are on, but
>I think that is about it.
>
>The only way I could think to try it is to have the calling search page
>open a new page that loads the script that will do the actual searching
>in frame "a", and have it open the first page of the site in frame "b".
>Then the script would go through and search for the string you want, and
>use the links in the page to crawl through the site.
>
>You would have to store the results in an array and pass it back to the
>calling page, as well as store all of the links an an array to make sure
>you crawled through them all.  That might work, but I think it would be
>easier to set it up with php, cf, asp or jsp.
>
>Doug.
>
>
--
Michael Pemberton
mpember at phreaker.net
ICQ: 12107010








More information about the thelist mailing list