Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. highlighting search terms

highlighting search terms

Scheduled Pinned Locked Moved ASP.NET
question
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    marky777
    wrote on last edited by
    #1

    Hi. You guys know the type of functionality in CP where if you search for things in articles you can specify if you want the search terms to be highlighted in the results, right? Does anyone know of an article or source code that does something like that? I need to get it working in my project. Thanks alot! M

    P 2 Replies Last reply
    0
    • M marky777

      Hi. You guys know the type of functionality in CP where if you search for things in articles you can specify if you want the search terms to be highlighted in the results, right? Does anyone know of an article or source code that does something like that? I need to get it working in my project. Thanks alot! M

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      One way to do this would be to have a javascript function which would read the page and wrap the relevant text in spans (set the style of the span to have a background colour).

      Please visit http://www.readytogiveup.com/ and do something special today. Deja View - the feeling that you've seen this post before.

      1 Reply Last reply
      0
      • M marky777

        Hi. You guys know the type of functionality in CP where if you search for things in articles you can specify if you want the search terms to be highlighted in the results, right? Does anyone know of an article or source code that does something like that? I need to get it working in my project. Thanks alot! M

        P Offline
        P Offline
        Pete OHanlon
        wrote on last edited by
        #3

        OK - I've had a quick look round and found this example: http://www.nsftools.com/misc/SearchAndHighlight.htm[^]

        Please visit http://www.readytogiveup.com/ and do something special today. Deja View - the feeling that you've seen this post before.

        M 1 Reply Last reply
        0
        • P Pete OHanlon

          OK - I've had a quick look round and found this example: http://www.nsftools.com/misc/SearchAndHighlight.htm[^]

          Please visit http://www.readytogiveup.com/ and do something special today. Deja View - the feeling that you've seen this post before.

          M Offline
          M Offline
          marky777
          wrote on last edited by
          #4

          Than you. I was searching around on the web as well, but probably not as efficiently as you were...;)

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups