Changing No documents found message

This tip describes how to change the default "No documents found" message.

Have you ever wondered about changing the default "No documents found" message in an embedded view? Here is a simple way to do this:


1) In the "HTML Head Content" of your form or page, add this code: "<style> H2 {display:none;} </style>"

This will avoid you to see the awful "No documents found" message before you change its settings.

2) Add this code to the "JS Header" event of your form or page:

var noDocumentsFound = document.body.all.tags("H2");

var tagH2, textH2;

for (var i = 0; i < noDocumentsFound.length; i++){

tagH2 = noDocumentsFound[i];

textH2 = tagH2.innerText;

if (textH2.toLowerCase() == "no documents found"){

tagH2.innerHTML = '<BR><FONT SIZE=2 FACE="Arial" Color =#00673>Nenhum documento encontrado</FONT>';

}

tagH2.style.display = "block";

}

Here we check if we've got the message "no documents found" inside the form or page. If it's true, we change its settings to something cooler. After all, we show every H2 tags that were found and hid. Hope this helps! =:0)

Dig Deeper on Domino Resources - Part 3

SearchWindowsServer

Search400

  • Favorite iSeries cheat sheets

    Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/Search400.com community. These cheat ...

  • HTML cheat sheet

    This is a really cool cheat sheet if you're looking to learn more about HTML. You'll find just about everything you every wanted ...

  • Carol Woodbury: Security

    Carol Woodbury

SearchDataCenter

SearchContentManagement

Close