Hide 'no documents found' on Web

Hide 'no documents found' on Web

You Can View User Feedback To This Tip

Here's an easy way to hide or replace the "No Documents Found" text on Web views.

You can hide the text or replace it with your own text in the language of your choice.

Create a $$ViewTemplateDefault Form.
Create a Table (1:1) on this form.
Hide the Tbale border
Put in the table cell (should be one cell) the following.

<div id="msg">
</div>
Create here a $$ViewBody field
<div id="view">
</div>

the div statements should be passthrough ofcourse.

Then include this JavaScript in form in the JS Header:

var msg ='<VALIGN=TOP><br><br><FONT SIZE=2
FACE="Arial">Sorry, Nothing to
display</FONT><BR><BR><FONT SIZE=2
FACE="Arial">Thank you,</FONT><BR><FONT SIZE=2
FACE="Arial">Greetings, </FONT><B><I><FONT
SIZE=2 FACE="Arial">.............</FONT></I></B>'
function CheckNoDocuments() { // function to replace the 'No
documents found' message
if (document.getElementById("view").innerHTML.indexOf("No documents
found") > 0) {
document.getElementById("view").innerHTML = ""
document.getElementById("msg").innerHTML = msg
} // end if } // end function And in the onload event: CheckNoDocuments()
That's it - have fun!

USER

    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.

FEEDBACK TO THIS TIP

  • Why not do this the easy/Notes way? Create a $$ViewTemplate. Put a "hide when" formula on the embedded view object (@IsError(@DbLookup("";"";"lookup view name";lookupvalue;1)) so that the view doesn't show if nothing is found. Add a text line below the embedded view object -- any message in any language you like -- with this "hide when" formula !@IsError(@DbLookup("";"";"lookup view name";lookupvalue;1)). —Michael P

This was first published in April 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.