Hide the relevance boxes in Web search results

Hide the relevance boxes in Web search results

This tip was submitted to the SearchDomino.com tip library by member Geor Klee. Please let others know how useful it is via the rating scale at the end of the tip. Do you have a useful Lotus Notes, Domino, Workplace or WebSphere tip or code snippet to share? Submit it to our monthly tip contest and you could win a prize.


VIEW MEMBER FEEDACK TO THIS TIP

Here's a simple Javascript to hide the gray or white relevance boxes in Web search results.

Put the following code in the onLoad event of that form:

kill_boxes()

Put the following code in the JS-Header section of your $$SearchTemplateDefault form or of any other form you use to display your web search results and voila -- the boxes are gone.

function kill_boxes()
{
for( i=0; i<document.images.length ; i++ )
{
if( document.images[i].src.indexOf('vwicnsr1.gif') != -1)
{ 
document.images[i].height= HEIGHT=0 
document.images[i].width= WIDTH=0
} //end if

if( document.images[i].src.indexOf('vwicnsr2.gif') != -1)
{ 
document.images[i].height= HEIGHT=0 
document.images[i].width= WIDTH=0
} //end if

if( document.images[i].src.indexOf('vwicnsr3.gif') != -1)
{ 
document.images[i].height= HEIGHT=0 
document.images[i].width= WIDTH=0
}

    Requires Free Membership to View

    Register today to access targeted resources from our editorial writers and independent industry experts focused on Lotus Domino, Notes, Workplace and other related technologies.

    By submitting your registration information to SearchDomino.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchDomino.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

//end if if( document.images[i].src.indexOf('vwicnsr4.gif') != -1) { document.images[i].height= HEIGHT=0 document.images[i].width= WIDTH=0 } //end if if( document.images[i].src.indexOf('vwicnsr5.gif') != -1) { document.images[i].height= HEIGHT=0 document.images[i].width= WIDTH=0 } //end if if( document.images[i].src.indexOf('vwicnsr6.gif') != -1) { document.images[i].height= HEIGHT=0 document.images[i].width= WIDTH=0 } //end if if( document.images[i].src.indexOf('vwicnsr7.gif') != -1) { document.images[i].height= HEIGHT=0 document.images[i].width= WIDTH=0 } //end if } // end for }

MEMBER FEEDBACK TO THIS TIP

After doing some research, I found this tip. It was not quite what I wanted to do, but it got me on my way. Add customized relevance pictures to the icons directory on your Domino server and put the following code in the onLoad event of that form:

kill_boxes()

Put the following code in the JavaScript header section of your $$SearchTemplateDefault form or any form you use to display your Web search results and the boxes are replaced.

  
function kill_boxes()
{
for( i=0; i<document.images.length ; i++ ) 
{ if( document.images[i].
src.indexOf('vwicnsr1.gif') != -1) 
{ document.images[i].
src= src="/icons/vwicnsrcus1.gif" 
//your custom icon document.images[i].
height= HEIGHT=11  // the height of your icon, 
domino generates its own height and wide
document.images[i].width= WIDTH=56   
// the width of your icon
} //end if
if( document.images[i].src.indexOf
('vwicnsr2.gif') != -1) 
{ document.images[i].src= 
src="/icons/vwicnsrcus2.gif"
document.images[i].height= 
HEIGHT=11 document.images[i].
width= WIDTH=56 } //end if if
( document.images[i].src.
indexOf('vwicnsr3.gif') != -1) 
{ document.images[i].
src= src="/icons/vwicnsrcus3.gif"
document.images[i].height= HEIGHT=11 
document.images[i].width= 
WIDTH=56 } //end if 
if( document.images[i].src.indexOf
('vwicnsr4.gif') != -1) 
{ document.images[i].src= 
src="/icons/vwicnsrcus4.gif" 
document.images[i].height= 
HEIGHT=11 
document.images[i].width= 
WIDTH=56 } //end if 
if( document.images[i].src.indexOf
('vwicnsr5.gif') != -1) 
{ document.images[i].src= 
src="/icons/vwicnsrcus5.gif"
document.images[i].height= HEIGHT=11 
document.images[i].width= WIDTH=56 } 
//end if 
if( document.images[i].src.indexOf
('vwicnsr6.gif') != -1) 
{ document.images[i].src= 
src="/icons/vwicnsrcus6.gif"
document.images[i].height= 
HEIGHT=11 
document.images[i].width= 
WIDTH=56 } //end if 
if( document.images[i].src.indexOf
('vwicnsr7.gif') != -1) 
{ document.images[i].src= 
src="/icons/vwicnsrcus7.gif"
document.images[i].height= 
HEIGHT=11 
document.images[i].width= WIDTH=56 } 
//end if } // end for }

—Wim B.

Do you have comments on this tip? Let us know.

This was first published in August 2002

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.