I am trying to read some context from a webpage and put it in the $Return replacement parameter.
I'm following the method described here:
The following code still worked and was successfully written to the $Return replacement parameter:
function GetCustomerData(){
var klantnumber = document.getElementById("RichWidgets_wt3_block_wtMainContent_wt12").value;
return klantnumber;
}GetCustomerData();
However, since I want to also store another parameter in my context and I cannot store multiple parameters here I tried to mold this into an array or an object, both of which do not work:
Return as an array:
function GetCustomerData(){
var klantnumber = document.getElementById("RichWidgets_wt3_block_wtMainContent_wt12").value;
var accountnumber = document.getElementById("RichWidgets_wt3_block_wtMainContent_wt13").value;
var person = [klantnumber, accountnumber] ;
return person;
}GetCustomerData();
Return as an object:
function GetCustomerData(){
var klantnumber = document.getElementById("RichWidgets_wt3_block_wtMainContent_wt12").value;
var accountnumber = document.getElementById("RichWidgets_wt3_block_wtMainContent_wt13").value;
var person = {};
person.klantnr = klantnumber ;
person.accountnr= accountnumber ;
return person;
}GetCustomerData();
Is there a way to write multiple parameter to the $Return replacement parameter?
Thanks in advance!
*This post is locked for comments