Forum Moderators: open
/claus
I have two ways of changing the highlights in javascript, one using textranges which works only on IE of course (well mozilla too with some modification) and the other way using innerHTML, which works on almost all of the newest versions of major browsers.
The php script you mentioned is an addon for Movabletype that takes the incoming refer from Google and highlights the words the person was searching for. Interesting but not what I want.
I was just looking to save some time, hunting for clean code that handles multi-color for multi-words like Google does. Google also handles quoted phrase matching from the toolbar if you didn't know that. I guess I will end up hacking it out myself in the end ;)
They wanted to display the correct tab where the keywords are present. So I created a JS version where you gave it an array of IDs, the text elements to consider, and an array of JS strings, code to execute when the text is found. With this it would switch automatically to th ecorrect tab and highlight the keywords.
It didn'T do quotes, but it does more then the standard plain ones...
SN