AnsweredAssumed Answered

How to assign js value to screen logical attribute?

Question asked by kalpu on Oct 17, 2018
Latest reply on Oct 18, 2018 by kalpu

Hi,

In IDM task, I have a HTML element. In this, using javascript, I'm reading the browser URL and setting the value to an HTML input field named "testAttr". Now, I want to set this value to screen logical attribute. (Note: the value is set correctly in "testAttr" html input field) In the initialization javascript I have,

function init(ScreenContext) {
var abc=document.getElementById("testAttr").value;
ScreenContext.setFieldValue("|displayAttr|",abc);
return true;
}

But the value is not set in |displayAttr| logical attribute.

 

One other approach was, getting the browser URL in the initialization javascript like below.

function init(ScreenContext) {
var abc=window.location.href;
ScreenContext.setFieldValue("|displayAttr|",abc);
return true;
}

Even the above code did not work.

 

Any help on this is highly appreciated.

 

Thanks,

KR

 

Outcomes