Skip to Content

BSP/HowTo: How to search inside your page

Quite often we need to search for content inside of the internet or website, but what about when you need to search for content inside of a page? Most of us will hit ctrl-F or go to the menu “EDIT -> FIND” and type away but what about those who have trouble with that?

For this problem we have the handy-dandy “Seach in Page” method which some of you have probably already used. In doing so you probably found that it has problems across various browser platforms and therefore, once again I found a nice script that was by far more compact than anything I had made myself; therefore I scrapped mine and I will give you this one.

Just add that into your page content and then as a test you can use this example:

Or like me I use a nice little graphic image ( ‘ICON_SEARCH’ it’s a icon available in the system ) in the top of my page (toolbar area) with some modifications to the script to take the value from a prompt box which you will see shortly in the next code below.

This will now go through the page and find what the person needs.

Another option I add to the page to help those searching is to highlight the requested keywords with a different color to speed the process up in finding them in the page. I add an icon to my page, this one I add manually to the system as I didn’t really find something already there image. Now of course you can combine these functions together and only show the “Find” icon, it’s your choice.

So to get the code on your page, simply add this to the Page Layout.

Then add an icon which links to the JavaScript function or add the call to the JavaScript function into your “Find” function just modify it to not prompt but to take the value from the input field.




Again something simple and easy to implement but with profound meaning to someone who has trouble with their eyes but yet they need to find specifics inside of an individual page.

You must be Logged on to comment or reply to a post.
  • Using color to help people find search phrases won't help people who are blind or are color blind. In fact, using color to convey information is a no-no according to the Web Accessibility Initiative (WAI) standards.

    The WAI standards are also a legal requirement for doing business with US or EU government agencies.

    Also, ALT tags need to be used on all images and icons so that people using screen readers can access them.

    • Thank you Keith for those tips.

      The purpose of the colors were for those hard of seeing, when scanning a report on a webpage that contains a few thosuand words (which of course is not the best use of a webpage) it is sometimes helpful.

      I will incorporate your tips into one of my next weblogs which covers screen readers though.

      Thanks again!!