Closed
How the property of section get value from JavaScript?
I hava a value in javaScript, but I want to give the value to the property of sction.Can you help me?
I hava a value in javaScript, but I want to give the value to the property of sction.Can you help me?
Could you please brief the requirement ?
I want to get the propetry "code" in function "createCode()" to a propety "ValidCode' in Section.
<script>
var code;
function createCode() {
code = "";
var codeLength = 6;
var checkCode = document.getElementById("checkCode");
var codeChars = new Array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z');
for (var i = 0; i < codeLength; i++)
{
var charNum = Math.floor(Math.random() * 52);
code += codeChars[charNum];
}
if (checkCode)
{
checkCode.className = "code";
checkCode.innerHTML = code;
}
tools.putParamValue("ValidCode", code);
}
window.onload=function(){
createCode();
}
</script>
<div>
<!--<input style="float:left;" type="text" id="VerifCode" onblur="validateCode();" />-->
<div class="code" id="checkCode" onclick="createCode()"></div>
</div>
This requirement is not feasible. We can set a javascript variable using a parameter value during section generation(PFB). But the converse is not true.
Var code = '<%= tools.getParamValue("ValidCode")%>';
Question
Question Solved
Question
Question
Question
Question Solved
Question
Question Solved
Question Solved
Discussion
Pega Collaboration Center has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.