toggle people search box option on

11 02 2009

This is a great way to display the people search options every time you navigate to the search center.

thannks to Steven Van De Craen for his contribution:
http://www.moss2007.be/blogs/vandest/archive/2007/08/28/sharepoint-2007-people-search-options-shown-by-default-repost.aspx

Instructions

Go to the People Search Page in your SharePoint Portal and modify the page (eg. /SearchCenter/Pages/people.aspx)

Add a Content Editor Web Part right below the People Search Box Web Part
Add the following javascript to the CEWP:


var anchors = document.getElementsByTagName(“a”);
var anchor;
var j;

// Iterate through all anchors on the page and find the one with ID ending in _PSB_Show
for (j = 0; j
{
if (anchors[j].id.match(/\_PSB_Show$/) != null)
{
anchor = anchors[j];
break;
}
}

// If the anchor is found and the click is supported in the current browser
// Perform a click after 100 ms
if ((anchor != null) && (anchor.click != null))
{
setTimeout(“anchor.click();”, 100);
}

Mark the Web Part as hidden and optionally give it a friendly name.
Screenshot

Advertisements

Actions

Information

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




%d bloggers like this: