12 Feb 2007 at 18:30 #1 Sherbs Sherbs Soldato Joined 26 Nov 2003 Posts 4,656 Location Brentwood Hey guys, Wonder if you can help me, looking for a basic text highlighter. With the search queries in an array. So eg; 1. Eggs 2. Bacon 3. Ham So, any matches to the array entries are highlighted on a page. Cheers.
Hey guys, Wonder if you can help me, looking for a basic text highlighter. With the search queries in an array. So eg; 1. Eggs 2. Bacon 3. Ham So, any matches to the array entries are highlighted on a page. Cheers.
12 Feb 2007 at 21:15 #2 Pr0t0c0L Pr0t0c0L Associate Joined 3 Dec 2003 Posts 943 HI download the script and include it in your html http://fucoder.com/code/se-hilite/ then place this in your html , you need to find a way of producing the keywords to highlight, ive just hardcoded them below Code: <script type = "text/javascript"> var keywords = new Array("egg","cheese","bacon"); Hilite.hiliteElement(document.body,keywords); </script> Then in your css style sheet, define some classes for the colours of the highlight .highlight1{background:xxx} .highlight2{background:xxx} .highlight3{background:xxx} .highlight4{background:xxx} .highlight5{background:xxx} if you have any troubles just post them and il answer
HI download the script and include it in your html http://fucoder.com/code/se-hilite/ then place this in your html , you need to find a way of producing the keywords to highlight, ive just hardcoded them below Code: <script type = "text/javascript"> var keywords = new Array("egg","cheese","bacon"); Hilite.hiliteElement(document.body,keywords); </script> Then in your css style sheet, define some classes for the colours of the highlight .highlight1{background:xxx} .highlight2{background:xxx} .highlight3{background:xxx} .highlight4{background:xxx} .highlight5{background:xxx} if you have any troubles just post them and il answer
14 Feb 2007 at 00:24 #3 Sherbs Sherbs Soldato OP Joined 26 Nov 2003 Posts 4,656 Location Brentwood Thanks for your reply, it won't be in html as its for greasemonkey. But I think I can work it out from here.
Thanks for your reply, it won't be in html as its for greasemonkey. But I think I can work it out from here.