469,328 Members | 1,251 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,328 developers. It's quick & easy.

Search engine on single page

I got a singe page where is a lot of text. Visitors usually looks a
one special text from that page, but it's so large-sized that they
will be frustrated. So, I need a javascript code which includes search
field where visitor can specify that single or multiple word that one
is looking for from the page. And when visitor press a search button,
javascript will highlight the correct word(s) from that page... Did
you understand? I know that somewhere on the internet is the code i'm
looking for, but i cannot find it. Thanks!

Sam
Jul 23 '05 #1
4 1308
Ivo
"Sam Smarty" wrote
I got a singe page where is a lot of text. Visitors usually looks a
one special text from that page, but it's so large-sized that they
will be frustrated. So, I need a javascript code which includes search
field where visitor can specify that single or multiple word that one
is looking for from the page. And when visitor press a search button,
javascript will highlight the correct word(s) from that page... Did
you understand? I know that somewhere on the internet is the code i'm
looking for, but i cannot find it. Thanks!

Sam


Do you mean something like
<URL: http://4umi.com/code/highlighttext.htm >
The search is for all entered words individually by default but optionally
for the exact phrase. Case-sensitivity is another option.
Ivo
Jul 23 '05 #2
Ivo <no@thank.you> wrote:
Do you mean something like
<URL: http://4umi.com/code/highlighttext.htm >
The search is for all entered words individually by default but optionally
for the exact phrase. Case-sensitivity is another option.


nice !
but ...
be care...
if i find ' ' (blank space only) or ' o' (blank space first then o) ...

boum !

--
@@@@@
E -00 comme on est very beaux dis !
' `) /
|\_ =="
Jul 23 '05 #3
Sam Smarty wrote:
I got a singe page where is a lot of text. Visitors usually looks a
one special text from that page, but it's so large-sized that they
will be frustrated.


Edit > Find in many browsers.

Mozilla has the funky Find-As-You-Type feature which can be activated for
non-link text by typing '/'.

(I have a thing about needlessly duplicating built in browser functionality
with JavaScript)

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Jul 23 '05 #4
That code seemed nice, but is there any other solutions available?

Sam
Jul 23 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by R. Rajesh Jeba Anbiah | last post: by
11 posts views Thread by Petre Huile | last post: by
5 posts views Thread by George | last post: by
8 posts views Thread by Craig Cockburn | last post: by
reply views Thread by Mark Goldin | last post: by
5 posts views Thread by Sam | last post: by
4 posts views Thread by MDW | last post: by
7 posts views Thread by =?Utf-8?B?SklNLkgu?= | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by listenups61195 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.