Domino Code Fragment

Code Name*
text input field in every row of a view
Date*
10/23/1999
Source (or email address if you prefer)*
Zvonko.Paunoski@icn.siemens.de
IP address:.52.14.85.76
Description*
Type*
Formula, HTML, JavaScript
Categories*
User Interface (Web)
Implementation:
None (plug and play)
Required Client:
NS4
Server:
4.6
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
In your $$NavigatorTemplateDefault form insert this lines
before your $$ViewBody field:
[ </FORM><FORM name="_elect" METHOD=post ACTION="elect?CreateDocument"
ENCTYPE="multipart/form-data" onSubmit="return collectSelected() ">
<INPUT TYPE=hidden NAME="Selected" VALUE="">
<input type=submit value="Select">]

After the table containing your $$ViewBody field insert this JavaScript
and assign to it HTML style:
<script language="JavaScript1.1">
var selArray = new Array();

function collectSelected() {
document._elect.Selected.value = selArray.join("; ");
}

function updSel ( cnt , doc )
{
addIt = true;
for( i = 0 ; i < selArray.length ; i++ ) {
selFld = selArray[i];
if ( selFld.indexOf( doc ) > -1) {
selArray[i] = doc + "(" + cnt + ")";
addIt = false;
break;
}
}
if (addIt) {
selArray[selArray.length] = doc + "(" + cnt + ")";
}
}
</script>
</FORM>


In your view insert a column with this formula:
docUnid := @Text(@DocumentUniqueID);
"[ <input type=text size=2 onChange=\'updSel(this.value,\""+docUnid+"\")\'>]"

You need also a form with the name: elect
This form has to have at least a field with the name: Selected
Assign to this form a QuerySaveAgent to process the input data.

P.S.:
Eliminate the blank char betwaen [ and < char in the source code.