I have a check box with an indicator for the return value.
If i check it manualy, after a submit(), the return value is *ON in my program : it's OK.
Now if it's checked by a JS function like below, then return value is *blanks after a submit() !!!!
Into an OnChange Element :
What the 'checked' attribute determines what is shown on the display (i.e. is the checkbox checked or unchecked.)
However, what gets sent to your RPG program is what is in the "checked value" or "unchecked value" attributes of the checkbox widget. So if you're looking to get *ON or *OFF in the RPG program, make sure the "checked value" is set to 1, and "unchecked value" is set to 0.
I think I see the problem here. Profound UI has a 'modified' flag on all widgets. It will only send values to the server for components that are seen to be modified by the user. So, it's not seeing the change made by your script.
Great! We were thinking that there should be an easier way to do this -- you can adjust most widgets through scripting using our "changeElementValue()" and "pui.set()" APIs. These set the modified flag internally so that you don't have to worry about it.
As it stands, these APIs don't work with checkboxes. However, we have updated them for the next release so that they can be used by passing either a true/false value to check/uncheck, or a value matching the 'checked value' property.