470,863 Members | 1,250 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

search using javascript?

nirmalsingh
218 100+
hi all,
i am having a textbox and a button in my web page. if i type a word and click button it should search for the typed word in the web page and bring that content to the top of the page. how should i do this??
Feb 12 '07 #1
8 1200
dmjpro
2,476 2GB
please try to do google search using document.selection..
right now i forget the exact code


u r welcome in advance
Feb 12 '07 #2
acoder
16,027 Expert Mod 8TB
hi all,
i am having a textbox and a button in my web page. if i type a word and click button it should search for the typed word in the web page and bring that content to the top of the page. how should i do this??
Why should you need this functionality? The browser already provides this, either from the menu (Edit -> Find) or by pressing Ctrl-F.
Feb 12 '07 #3
dmjpro
2,476 2GB
don't mind ..
don't kill his interest to learn where it can be done using js ...
i saw it ....
Feb 13 '07 #4
acoder
16,027 Expert Mod 8TB
Well, I'm not really intending to kill his interest in learning. I think it'd rather be better spent in something else not already done.
Feb 13 '07 #5
dmjpro
2,476 2GB
sorryyyyyyyyyyy for it ........................

good attitude .....
Feb 14 '07 #6
nirmalsingh
218 100+
actually i am having a long tree structure inside a scrollable division. when a user search for a word. if it contains in tree, the division should scroll automatically and show the selected word in top of division. thats what i needed.
Feb 14 '07 #7
acoder
16,027 Expert Mod 8TB
Well, that's different. Post the relevant code.
Feb 14 '07 #8
dorinbogdan
839 Expert 512MB
See this related sample:
Text Range Search and Replace (IE only)

If "Service unavailable" error appears while accessing the page, please retry.
Feb 15 '07 #9

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by D. Lee Christopher | last post: by
5 posts views Thread by Deryck | last post: by
1 post views Thread by ratnakarp | last post: by
7 posts views Thread by Matt Kruse | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.