Add home and back button to the search result page in SharePoint 2010

Once people get into the search result page, there is no way to go back to the previous page without clicking the browser back button.

We can add some code to a content editor web part to display a button on the page to let people go back to previous page and with search term displaying in the search box.

Here is the code to add to a content editor web part:

<!–Home button–>

<a href=”/”>
 <img src=”_layouts/images/hhome.png” border=”0″ alt=””/>
</a>
<a href=”/”>Home</a>

<!–Back button–>
<a onclick=”history.go(-1)” href=”#”>
 <img src=”_layouts/images/back.gif” border=”0″ alt=””/>
</a>
<a onclick=”history.go(-1)” href=”#”>Back</a>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s