It has been almost a year since the last update (way too busy at the moment), but here you are — a new version of Search Engine Highlight Javascript for your websites. What is in this change:
- More search engines are supported. Added MSN Live, Technorati and Dogpile.
- Add the framework for search engines that don’t use query string, i.e. Technorati, Dogpile and many others.
- Fix up an issue with
Hilite.style_name_suffix = false.
It has also been tested on IE7, FF2 and Opera9. Go to the project page and download either the zipped file or the raw JS from my SVN repository.
Hi,
My name is ashok i am doing a sample project plz tell me the sample coding for search it is useful for me to finish my project
I’m just wondering how difficult it would be to capture the search terms and place them in a text area instead of highlighting them. Any help would be appreciated.
Thanks,
Xchanin
GoodDay Sir!
i Could not Control my excitement when i traced this article and the associated
source code, although i have not used it as yet, but i really extend my whole hearted Appreciations to Your goodself for writing this article and helping developers all round this world
well my task is just to fetch the keywords which the user had entered and later process them as per my own requirements , my query to yourgoodself is that how this script will be invoked fro our webpage and what i need to do in order to just copy the searched words into a javascripy array
i shall be highly grateful to you for your valuable suggestions and rest
Thanks once again
Zubair
Zubair,
This script attached to the
window.onloadevent handler so it gets executed when all objects are loaded in the page. It looks at the referral of the document to determine the keyword people used to land on your page.To get a list of keywords, you can do (in Javascript)
var keywords = Hilite.decodeReferrer(document.referrer);keywrodswill just be a Javascript array of search keywords.How would I modify this highlight code to not highlight certain words? For example, I would want “and”,”of”,”to” to highlight.
Hi there,
I have noticed a small issue when the script is called and no highlight is present. Where there is the check on line 140:
if (idx <= 0)Since the idx var is incremented just before the test, often the return value of indexOf is coming out as 0 which then means there is a false positive, event at the end of the query string.