I would like to pass values of 4 fields in to new XPages with ClientSide JavaScript
Find below what i tried so far, I cannot put values into field in the new XPages :(
//Client Side JS pass values to the new window
var cFld = document.getElementById("#{id:fieldNameID}").innerHTML ;
myUrl = "http://serveradres/applicationame.nsf/xspFrmTest.xsp?action=newDocument";
var zWindow = window.open(myUrl, '_blank');
var zDoc = zWindow.document;
zDoc.getElementById("#{id:fieldNameID2}").value = "TEST VALUE";
UPDATE 1: the new page i would like to open is in the another application. So i cannot carry any values with any type of scopes (Application, session, etc...) thinking about sample below. From xspfrmtest.xsp to xspfrmtest2.xsp
- Application1.nsf -> xspfrmtest.xsp
- Application2.nsf -> xspfrmtest2.xsp
zWindow.document.querySelector('[id$=":fieldname"]').value="TEST VALUE";
– xpages-noob...&field1=value1
) and set the computed value of the target component to#{param.field1}
. – xpages-noob