how to remove "This Site" from search dropdown box
Bloqueado
-
quarta-feira, 16 de setembro de 2009 15:22how to remove "This Site" from search dropdown box
I'm running moss 2007
Respostas
-
quarta-feira, 16 de setembro de 2009 17:47
Add the java script code to the master page template
Insert the following code between the <HEAD> and </HEAD> tags. This code gets the search scopes dropdown list and removes all options which contain a specified character. In this scenario, I intend to remove all options which contain ":" character.
<script type="text/javascript">
function removeOption(checkChar) {
var x = document.getElementById("ctl00_PlaceHolderSearchArea_ctl01_SBScopesDDL");
for (i = 0 ; i < x.length; i++) { if (x.options[i].text.indexOf(checkChar) != -1) { x.remove(i); i--; } } }
</script>
Then call the above function in on load event of BODY tag<BODY scroll="yes" onload="javascript:if (typeof(_spBodyOnLoadWrapper) != 'undefined') { _spBodyOnLoadWrapper(); removeOption(':'); }">
~~~Richard- Sugerido como Resposta CoreyRothMVP quarta-feira, 16 de setembro de 2009 21:18
- Marcado como Resposta Lambert Qin [秦磊]MVP, Moderator sexta-feira, 18 de setembro de 2009 02:43
-
quinta-feira, 17 de setembro de 2009 22:35
This post have answer to remove "this site".http://social.technet.microsoft.com/Forums/en-US/sharepointsearch/thread/dc35ccf4-bc94-4827-9f16-83478c8642d1Hope this help....
André Lage Microsoft SharePoint and CRM Consultant
Blog:http://aaclage.blogspot.com
Codeplex:http://spupload.codeplex.com/http://simplecamlsearch.codeplex.com/- Marcado como Resposta Lambert Qin [秦磊]MVP, Moderator sexta-feira, 18 de setembro de 2009 02:43
Todas as Respostas
-
quarta-feira, 16 de setembro de 2009 17:47
Add the java script code to the master page template
Insert the following code between the <HEAD> and </HEAD> tags. This code gets the search scopes dropdown list and removes all options which contain a specified character. In this scenario, I intend to remove all options which contain ":" character.
<script type="text/javascript">
function removeOption(checkChar) {
var x = document.getElementById("ctl00_PlaceHolderSearchArea_ctl01_SBScopesDDL");
for (i = 0 ; i < x.length; i++) { if (x.options[i].text.indexOf(checkChar) != -1) { x.remove(i); i--; } } }
</script>
Then call the above function in on load event of BODY tag<BODY scroll="yes" onload="javascript:if (typeof(_spBodyOnLoadWrapper) != 'undefined') { _spBodyOnLoadWrapper(); removeOption(':'); }">
~~~Richard- Sugerido como Resposta CoreyRothMVP quarta-feira, 16 de setembro de 2009 21:18
- Marcado como Resposta Lambert Qin [秦磊]MVP, Moderator sexta-feira, 18 de setembro de 2009 02:43
-
quinta-feira, 17 de setembro de 2009 01:01thk it worked
-
quinta-feira, 17 de setembro de 2009 22:35
This post have answer to remove "this site".http://social.technet.microsoft.com/Forums/en-US/sharepointsearch/thread/dc35ccf4-bc94-4827-9f16-83478c8642d1Hope this help....
André Lage Microsoft SharePoint and CRM Consultant
Blog:http://aaclage.blogspot.com
Codeplex:http://spupload.codeplex.com/http://simplecamlsearch.codeplex.com/- Marcado como Resposta Lambert Qin [秦磊]MVP, Moderator sexta-feira, 18 de setembro de 2009 02:43
-
terça-feira, 15 de fevereiro de 2011 23:13Worked like a charm! Thanks!

