Updated: 1/09/2005; 21:05:39.
Hannes 'Shorty' Decorte's Radio Weblog
Learning .Net and the Experiences doing so


zondag 21 augustus 2005

If you want to change the magnify and arrow image of the SearchBox in WSS you could replace the gosearch.gif and magnify.gif image in the
%Program Files%Common FilesMicrosoft Sharedweb server extensions60TEMPLATEIMAGES directory. Problem is that this affects all the SharePoint sites.

A better solution would be adjusting the default.aspx file in a custom site definition. Since the SearchBox is a webcontrol there is no direct way.
But if you open the source of a in the browser loaded default.aspx file you'll find what the source is of the images.

Using the following javascript you can adjust the images:


<script language="javascript">
var i = document.images.length - 1;

while (i >= 0)
{
 var img = document.images[i];
 if (img.src.indexOf('/_layouts/images/gosearch.gif') > -1)
 {
  img.src = img.src.replace('gosearch.gif','sporty/search08.gif');
 }

 if (img.src.indexOf('/_layouts/images/magnify.gif') > -1)
 {
  img.height = '0px';
 }
 i--; 
}
 

</script>

Maybe there is a better way? Let me know...


3:33:32 PM    comment []

© Copyright 2005 Hannes 'Shorty' Decorte.
 
August 2005
Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Jul   Sep


RSS Feed


Other .Net Bloggers

Bart De Smet
Jan Tielens
Patrick Verbruggen
Patrick Tisseghem
Tom van de Kerkhof's Bloggings
Tom's Corner
Yves Hanoulle

Aggregated Feeds

Belgian .NET Bloggers