Manage Learn to apply best practices and optimize your operations.

Customize 'no documents found' screen

Instead of having the message "no documents found" show up on your otherwise customized view, use this JavaScript to replace those words with whatever text or HTML you desire.

Rather than having the message "no documents found" show up on your otherwise customized view, use this JavaScript code to replace those words with whatever text or HTML you desire. This is especially useful in dynamic views, which show a single category in which the category may or may not be present, depending on the logic of the computed category.

Add this code to $$ViewTemplateDefault form or any method through which you display views on the Web. Put this function in the jsheader area of your form.

function checkDocs(){
var v = document.getElementById('view');
 if(v){
  var pos=v.innerHTML.toLowerCase().
indexOf("<h2>no documents
found</h2>")
  if (pos>=0){
  v.innerHTML = '<computed text here 
or what ever html you want 
to appear rather than no documents found>';
  }
 }
}

Add this to the body tag of the form onLoad="checkDocs()". Finally, wrap the ViewBody in a div tags as follows:

start div: <DIV id="view">

end div: </DIV>

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

This tip was submitted to the SearchDomino.com tip exchange by member Daron Lawing. Please let others know how useful it is via the rating scale at the end of the tip. Do you have a useful Notes/Domino tip or code to share? Submit it to our monthly tip contest and you could win a prize and a spot in our Hall of Fame.

Dig Deeper on JavaScript for Lotus Notes Domino

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchContentManagement

Close