In a web application… user opens view with a ton of docs. Could the user place cursor over comments value in row and have the comments hover? Users are tired of clicking on docs just to see comments. …cannot include in view… too many comments (would be noisy). Also, is there a way to force a web view to show all docs vs. only 30, etc…?
Subject: rollover & field value (in view)
To answer the second part of your question there are a couple of fields in the Internet Web Site document that you can change…these are:* Default lines per view page
- Maximum lines per view page
And you can find them under the ‘Domino Web Engine’ tab in the ‘Conversion / Display’ section.
Also embedded views have a property enabling you to override the default settings if required.
Alex
Subject: RE: rollover & field value (in view)
Many thanks… just assumed this was a Db feature vs. internet site doc.
Subject: RE: rollover & field value (in view)
To the second question: The count in the Site Doc is the default. you can send a custom url formatted like viewname?openview&count=xxx to show that number of documents (-1 should show ALL documents in the view).
To answer the first question: yes, this can be done using javascript. I generally create my own html views instead of relying on Domino to build the views, so this becomes a simple matter of adding the javascript events to the view columns. However, it should be feasible to build an event handler in the onLoad event that looks at all of the tags and attaches the event handler for onMouseOver (and one for onMouseOut) to those which have ?opendocument in the url (this will prevent the other domino generated tags for navigation, etc from having these handlers).
The additional data can be shown one of two ways: in a dialog box, or in a div element. The dialog box method is pretty much useless these days due to pop-up blockers. I will post the code for both methods in a sep. doc here.
Subject: RE: rollover & field value (in view)
Dialog data - The view column (note that the code with the REM next to it for
linkmouse will open the document in a new window):
This code shows the contact’s phone number, and other info when the link (the
contact’s name) is hovered over.
View column Code:
imp := @Length(@Implode(txtdetails; @NewLine));
REM {change the onmouseover for linkmouse to show the messages span.};
REM {change the onmouseout for linkmouse to hide the messages span.};
REM {create a unique id value to append to EACH div of class blogdocument};
linkclick := “<a href="” +
“http://corp.steinmart.net/phonelist.nsf/employee?searchview&query=FIELD%20lastn
ame=” + @RightBack(kwdrequestedby; " ") + “" target="_new">” +
kwdRequestedby + “”;
REM {linkmouse := “A HREF onMouseOver=“descWindow =
window.open(‘’,‘codeDesc’,‘height=100,width=350, top = 50’);
descWindow.document.writeln(‘Requestor
Information’); descWindow.document.writeln('”+ phone1+
“
” + “‘); descWindow.document.writeln(’”+ phone2+ " - " + phone3 + “‘);
descWindow.document.writeln(’
Ext: “+ phone4+ “
” + “');
descWindow.document.writeln(‘Location: “+ phone5+”’);
descWindow.document.close();” onMouseOut=‘descWindow.close();’>”+
kwdRequestedBy +”]”;};
linkmouse := “A HREF onMouseOver="showDiv('messages_” +
@Text(@DocumentUniqueID) + “" + PHONE4 + “‘, " + "[’” + PHONE2 + " - " +
PHONE3 + “‘,’” + "Ext: " + PHONE4 + “‘,’” + "Location: " + PHONE5 + “'], '” +
@Text(@DocumentUniqueID) + "” + PHONE4 +“'); waittofade();"
onMouseOut="closeDiv('messages_” + @Text(@DocumentUniqueID) + “" + PHONE4
+“', '” + @Text(@DocumentUniqueID) + "” + PHONE4 +“');">”+ kwdRequestedBy
+“]”;
“<div class="blogdocument"><div class="blogtitleheader">” +
@Text(@DocNumber) + ". " + @Left(txtProjectTitle; 110) + “<div
class="blogdateheader" id='” + @Text(@DocumentUniqueID) + “_” + PHONE4 + “'>”
- “Request Created " + @Text(dteCreated) + " - Requested By: " + linkmouse + "
(” + kwdDepartment + “)” + “
” + “Status: ” + kwdStatus + “” +
@If(ckdeploydoc != “”; “         
Documentation: " + ckdeploydoc; “”) +”<div class="blogbody">" +
@Trim(@NewLine + @Implode(txtdetails; @NewLine)+ “
” +
@Implode(txtdevNotes; @NewLine)) + “” + “
”
I have placed this code in a script library so it can be accessed via any
$$ViewTemplate form. The parameters passed to the function are created in the
view column above (in the linkmouse variable).
function closeDiv(msgcontainer){
//get the message element by its id (messagecontainer) and remove it
var c = document.getElementById(msgcontainer);
if (c != null){
c.parentNode.removeChild(c);
}
}
function showDiv(msgcontainer, messagevariable, docunid){
//message variable is an array of Strings with 5 elements (0 to 4)
var ds = document.createElement(“div”);
var messagestring = “”;
var p = new Array(); //array of li tags
var t = new Array(); //array of text nodes
var list = document.createElement(“dl”);
for (x = 0; x < messagevariable.length; x++){
messagestring += messagevariable;
p = document.createElement(“dt”);
t =
document.createTextNode(messagevariable);
}
ds.setAttribute(“id”, msgcontainer);
ds.setAttribute(“className”, “messages”);
ds.appendChild(list);
for (y = 0; y < t.length; y++){
p[y].appendChild(t[y]);
list.appendChild(p[y]);
}
var b = document.getElementById(docunid) //the container div // I need
the container that holds the title, not the entire container
b.appendChild(ds);
}
This code goes in the javascript library as well and is simply used in the
yellow-fade technique and is optional:
// Yellow fade technique:
var Color= new Array();
Color[1] = “ff”;
Color[2] = “ee”;
Color[3] = “dd”;
Color[4] = “cc”;
Color[5] = “bb”;
Color[6] = “aa”;
Color[7] = “99”;
//alternate color set for dialog boxes
var sColor= new Array();
sColor[1] = “cc”;
sColor[2] = “99”;
sColor[3] = “66”;
sColor[4] = “33”;
sColor[5] = “00”;
function waittofade() {
$(“messages”).style.backgroundColor = “#ffffff”;
setTimeout(“fadeIn(7)”, 200);
}
function fadeIn(where) {
if (where <= 7) {
$(“messages”).style.backgroundColor = “#ffff” + Color[where];
if (where < 7) {
where += 1;
setTimeout(“fadeIn(”+where+“)”, 200);
} else {
where += 1;
setTimeout(“fadeIn(”+where+“)”, 200);
// $(“messages”).style.backgroundColor = “transparent”;
$(“messages”).style.backgroundColor = “#ffff99”
//$(“messages”).id = ‘’;
}
}
}
This goes in the style sheet to handle formatting of the message div:
.messages{
font-style:normal;
display: inline;
position:relative;
padding: .5em;
width: 300px;
clear: both;
background-color: #eeffff;
}
Subject: RE: rollover & field value (in view)
Joel… many thanks! Will test some of these…