Below code will help us to Change Component properties through JavaScript.

We used it in one of the work units where the requirement was to change “Cancel” button Component property Label to “Return”.

Javascript on HTMLArea:

<script type=”text/javascript”>
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != ‘function’) {
window.onload = func;
} else {
window.onload = function() {
oldonload();
func();
}
}
}
addLoadEvent(function() {
document.getElementById(“#ICCancel”).value = “Return” ;
});
</script>