Search Engine Highlight Javascript 1.5

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.

Category: General | Fri, 8 December 2006 12:06 pm

Comments

1.
Avatar for Ashok
Posted by Ashok on Fri, 8 December 2006 8:35 pm

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


2.
Avatar for xchanin
Posted by xchanin on Thu, 28 December 2006 12:48 pm

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


3.
Avatar for Zubair Masoodi
Posted by Zubair Masoodi on Tue, 16 January 2007 11:19 pm

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


4.
Avatar for Scott Yang
Posted by Scott Yang on Wed, 17 January 2007 8:44 am

Zubair,

This script attached to the window.onload event 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);

keywrods will just be a Javascript array of search keywords.


5.
Avatar for Larry
Posted by Larry on Wed, 12 March 2008 5:31 pm

How would I modify this highlight code to not highlight certain words? For example, I would want “and”,”of”,”to” to highlight.


Add a comment

Gravatar is used. Email address is required but will not be displayed. Please keep your comment on topic. No spamming and/or bad language. First time poster will be moderated. Scott reserves the right to delete/edit your comments.