Question
HMRC Services Group
GB
Last activity: 10 Jul 2021 2:16 EDT
Passing java script variable to clipboard property
Guys,
Below is my snipped of function:
function starttimer() {
count += 2;
var oElem = document.getElementById("divtxt");
oElem.style.color = oElem.style.color == "red" ? "blue" : "red";
document.getElementById("pcount").innerHTML = "Your Time Starts: " + count;
pega.u.d.setProperty("pyUsage",5,"OperatorID");
var options = {
name: "SampleTimer",
event: event
};
pega.api.ui.actions.runDataTransform(options);
}
I want to set the variable count to a clipboard property .. for example OperatorID.Counter
I tried below methods
a) <input type=hidden id="pcount" name="OperatorID.Counter">
b) Tried SetValue function,Its actually setting literal value as count, rather than the value of the variable
Most article related to java script to clipboard property is unpublished. Not sure why