Extend Views With Linked Category Strings And Mouseover Statusline For Categories And Documents

Before using this code replace all { and } by square brackets. Replace the
words "xcript" by "script"


Code is easy to use and interesting for developers who like to modify Notes
standard views without leaving the the scope of @functions.

Use the given codes in views in order to
1. generate the link-URL for the category-strings too and not only for the
twisties
2. use an individual JS-mouseover Statusline message
3. work with JavaScript disabled Browsers as ususal without further modification

Modifications to your needs are straight forward.

Put the following code in the approriate form $$ViewTemplate (resp.
$$ViewTemplateDefault if you don't use individual ViewTemplates). JS-Variable
DQ stands for DoubleQuote (") and SQ for for SingelQuote (') which are
generated by JS-function "unescape".

"<XCRIPT LANGUAGE=\"JavaScript\">" + @NewLine +
"<!--" + @NewLine +
" DQ=unescape(\"%22\"); " + @NewLine +
" SQ=unescape(\"%27\"); " + @NewLine +
"//-->" + @NewLine +
"</XCRIPT>" + @NewLine



Put the following code in row-Formula when Row is Categorized

Text := LastName;
StatusText := Title + " " + FirstName + " " + LastName;
Face := "verdana, arial, helvetica";
Size : "2";
Color := #800000;

"{<XCRIPT>" +
"document.write(" +
"\"<A HREF=\"+DQ+document.links{document.links.length-1}+DQ+\"
onmouseover=\"+DQ+\"window.status=(\"+SQ+\"" +
StatusText +
"\"+SQ+\");return true\"+DQ+\"
onmouseout=\"+DQ+\"window.status=(\"+SQ+SQ+\");return true\"+DQ+\">\")" +
"</XCRIPT>" +
"<FONT FACE=\"" + Face + "\" SIZE=\"" + Size + "\" COLOR=\"" + Color + "\"><B>"
+ Text + "</B></FONT>" +
"</A>}"




Put the following code in row-Formula when Row is NOT Categorized offering a
link to the document.

Path := @ReplaceSubstring( @Subset(@DbName; -1); "\\"; "/");
View := @Subset(@ViewTitle; -1);
DocID := @Text( @DocumentUniqueID) );
Text := TextItemFromDocument;
StatusText := @Ascii(@ReplaceSubstring( Text; "\'" : "\""; "\\\'" : "\\\'" ) );
Face := "verdana, arial, helvetica";
Size : "2";
Color := #000000;

"{<A HREF=\"" + "/" + Path + "/" + View + "/" + DocID + "?OpenDocument\" " +
"onmouseover=\"window.status=(\'" + StatusText + "\'); return true\" " +
"onmouseout=\"window.status=(\'\'); return true\">" +
"<FONT FACE=\"" + Face + "\" SIZE=\"" + Size + "\" COLOR=\"" + Color + "\">" +
Text + "</FONT>" +
"</A>}"
This was first published in November 2000

Dig deeper on Domino Resources - Part 6

0 comments

Oldest 

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:

-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 ...

SearchEnterpriseLinux

SearchDataCenter

SearchExchange

SearchContentManagement

Close