Page 1 of 1

Saving Drop Down Data

Posted: Thu Sep 12, 2019 1:54 pm
by mwalter
I have a series of cascading drop downs that are loaded by Ajax calls and java script. These work just fine, but when the user presses OK, control is returned to the RPG in order to validate some data on the screen. If there are errors, the screen (tab panel) is returned and the drop downs are reinitialized to their original state, blank.

Any way of keeping this from happening other than the brute force method of writing the data to a variable, and then rewriting it when the screen is redisplayed?


Thanks,

Mark.

Re: Saving Drop Down Data

Posted: Thu Sep 12, 2019 2:03 pm
by Scott Klement
If you write the display with EXFMT or WRITE, it will completely delete and re-draw everything on the screen.

If you want to avoid that, you can use Ajax requests.

You can also set the value property of the dropdown to whatever you want to be displayed so that its set to that when the screen reloads.

Re: Saving Drop Down Data

Posted: Fri Sep 13, 2019 7:57 am
by mwalter
Thanks, Scott. Didn't even think of that.