By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,571 Members | 952 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,571 IT Pros & Developers. It's quick & easy.

search using javascript?

nirmalsingh
100+
P: 218
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
Share this Question
Share on Google+
8 Replies

dmjpro
100+
P: 2,476
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
Expert Mod 15k+
P: 16,027
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
100+
P: 2,476
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
Expert Mod 15k+
P: 16,027
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
100+
P: 2,476
sorryyyyyyyyyyy for it ........................

good attitude .....
Feb 14 '07 #6

nirmalsingh
100+
P: 218
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
Expert Mod 15k+
P: 16,027
Well, that's different. Post the relevant code.
Feb 14 '07 #8

dorinbogdan
Expert 100+
P: 839
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.