Display Customized Message

You Can View User Feedback To This Tip

Display Customized message (In other Languages too) in place of "No Document Found" in Embedded Views

If you don't want to use @dbcolumn as it has a great impact on the server performance for the large databases . Here is a different way using Java Script:

 Create an embedded view within a DIV Tag on your form as shown here: <div id="view"> ------> Mark it as pass thru HTML Your embedded View (Note: Do not select embedded view as Pass Thru HTML) </div> ------> Mark it as pass thru HTML Create the customized message within DIV Tag which you want to display when there is no document in the view as shown here: <div id="msg"> ---------> Mark it as pass Thru HTML Customized message (Note: This line is not pass thru HTML) </div> ----> Mark it as pass Thru HTML Put the following code In JS Header : function HideView() { var tableTags = document.all.tags('tr') ; if (tableTags.length==0) { document.all.msg.style.visibility="visible"; document.all.view.style.visibility="hidden"; } else { document.all.msg.style.visibility="hidden"; document.all.view.style.visibility="visible"; } Put the following code in On Load Event: HideView()



  • Maybe you have designed your $$ViewTemplate as follows: At first you have a table witch contains your own actions (for example some designed buttons). After this table, you have your embedded view (displayed as Java Applet). In this case, you could use the following code (we use JavaScript and CSS):

     Design your $$ViewTemplate as follows: - Table with your actions Put these lines under your table: <DIV ID="vwEmbed"><P> --> Mark it as pass thru HTML Your embedded view (displayed as java-applet) --> Do not mark as pass thru HTML !! </P></DIV> <DIV ID="msg">Sorry. No documents found.</DIV> Put the following code In JS Header : function cstNDFMsg() { var chkH = document.all.tags('h2') ; if (chkH.length==1) { document.all.msg.style.visibility="visible"; document.all.vwEmbed.style.visibility="hidden"; } else { document.all.msg.style.visibility="hidden"; document.all.vwEmbed.style.visibility="visible"; } } Put the following code in On Load Event: cstNDFMsg() Put the following code in the HTML HEAD Content: "<STYLE TYPE="text/css">"+ "/* P APPLET is used to resize the ViewTemplate */"+ "p applet {width:100%;height:90%;}"+ "/* H2 is used by Domino for displaying the 'No Documents found' message */"+ "h2 { font: normal Tahoma,Arial,Helvetica,sans-serif 8pt #aa0000; text-align:center; }"+ "/* Customized 'No Document found' message */"+ "#msg {padding-top:5pt;text-align:center;height:40px;font-family:Tahoma,Arial; font-size:16pt;font-weight:bold;border-style:solid; border-width:1px;border-color:#000000; background-color:#ffffff;color:#aa0000;}"+ "</STYLE>"

    You could play with the stylesheet to get your own NO DOCUMENTS FOUND-Style.

    ¬óChristian Weiss 

This was first published in June 2001

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

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.