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