OpenNTF.org - Remove "No Documents Found" me
My Links (Not logged in)
Code Bin Search
 
Hosted by Prominic.NET
Rate This Code
5 - brilliant stuff
4 - very nice
3 - average
2 - needs work
1 - bad
   OpenNTF Code Bin
About This Code
Brief Description:
Remove "No Documents Found" message from empty views 
Rating:
Rating: 3 , Number of votes: 3 
Contributor:
Andrew Jones 
Category:
CSS 
Type:
Webdevelopment 
Last Modified:
17 Jun 2002 
OpenNTF Disclaimer

All of the program code and information presented in the OpenNTF.org Code Bin are provided "as-is", and should be used at your own risk. OpenNTF.org make no express or implied warranty about anything in the Code Bin, and OpenNTF.org will not be responsible or liable for any damage caused by the use or misuse of anything from this site. OpenNTF.org makes no guarantees about anything. Please thoroughly test all of the knowledge and code you find here before you attempt to use them in your production environment.

Code / Description

REM "Just add this code to the HTML Head Content event in R5";
REM "or the $$HTMLHead field in 4.x";
REM "Make the color of the text the same color as the background.";

"<style type="text/css"> <!--
H2{ color: #FFFFFF; }
--> </style>"
Usage / Example
 Comments
Posted by Patrick Lambourne on 01/19/2005 08:29:42 AMBetter solution
The above solution just colours the 'No documents found' message as the same as the background. There is a technique to make the browser ignore the message for views that use the display using HTML option:
put html open comments '<!--' before the embedded view.
In the title of the first view column close the html comments '-->'
After the embedded view put an open and close html comments '<!-- -->'
You need to make sure that the column headings are being displayed and that the html comments are being passed through as html - either use passthru html or square brackets [ ] around the comments above.
With this technique either the html comments are opened before the view and then closed in the by the column headings of the view, however if no documents are found the column headings are not displayed so the comments are closed after the view is displayed.
Posted by Rob Pinion on 06/13/2007 05:41:26 PMAnother option
If you don't have any other h2's then you can also use:
<style>h2 {display: none;}</style>
Posted by Ayhan Sahin on 06/16/2011 03:58:00 AMSolution with jQuery
Just in the document.ready-Event / onLoad-Event of your JS-File / Form etc.
$("h2:contains('No documents found')").remove();
 Add your comment!