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=2That's it - have fun!
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()
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.
- 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