Modify osssearchresults.aspx page of WSS
We have an application where we modify the search core resuult web part XSLT of MOSS search result page (Results.aspx) to call some custom javascripts . Is 开发者_JS百科it possible to do the same for the application level page of WSS i.e osssearchresults.aspx ?
You cannot change the search results page in a WSS installation, you need to customize your masterpage a bit to change that behavior.
it defaults to:
<SharePoint:DelegateControl runat="server" ControlId="SmallSearchInputBox" />
but you can render some javascript under the control to fix the link for you (jQuery sample):
<script type="text/javascript">
$(".ms-searchform a[@id $= '_go']").attr("href", "#").click(function() {
// redirect to new page, getting the selected scope and keyword
});
</script>
the selector gets "the a element under the .ms-searchform class that ends with _go in its id attribute". to get the scope and keyword, its a similar approach.
You could create your own (just copy the osssearchresults.aspx to the site collection and edit it) and in the site settings change the url of the search results page.
精彩评论