Tip

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

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.