Tip

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
} //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

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

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.