Copying Values to a View Template

In a web application, the following JavaScript copies the field values from a child window to its parent window.

function copyToOpener() {

for ( i = 1; i < document.forms[0].elements.length; i++)  {

    var fieldName = document.forms[0].elements[i].name;	  

    if (fieldName != null && fieldName != '') {

	opener.document.forms[0].elements[fieldName].value=document.forms[0].elements[i].value;

	}

}



window.close();

}

The above code does not run however if the child window is created from a view template rather than a form. Apparently a view template is interpretted by a browser as being a view rather than a form. (The URL says ‘?OpenView’ rather than ‘?OpenForm’). Adding a subform to the view template does not make a difference.

I’d appreciate any ideas on whether there might be another means by which values can be copied from a child window to a view template.

Thanks.

Subject: Copying Values to a View Template

$$ViewTemplates are not opened in edit mode, so any fields you want to use have to be in passthru HTML. The browser knows nothing of Domino design elements (whether something is a view or a form or a page) – all it looks for is tags containing , and