Additional Blogs by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
craigcmehil
Community Manager
Community Manager
0 Kudos
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 ( '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 . 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.

2 Comments