Odd ONLOAD behavior

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
ECTS_Kevin
New User
Posts: 6
Joined: Tue May 01, 2018 12:57 pm
First Name: Kevin
Last Name: Nunn
Company Name: Eclipse Consulting
Contact:

Odd ONLOAD behavior

Post by ECTS_Kevin »

I have a rpgle program that displays a screen while processing is being done in the background, and then will optionally display several screens afterwards that have buttons for the user to "press" to continue. All of these screens are set as "Show as window".

Code flow is
exfmt screen0 - main program display
exfmt screen1 (just display, no buttons or inputs - with ONLOAD set to pui.click() )
call program (does not use screen at all)
exfmt screen2 - windowed - informational display with button to continue
exfmt screen3 - windowed - informational display with button to continue

screen2 and 3 are displaying but it is acting like enter is being pressed and program goes back to displaying screen0.

The only way I have found to stop it is to A) remove the onload from screen1 OR B) change the screen2/3 to NOT "Show as Window" which then clears the screen and looks bad, but the screens do not get auto-entered.

This was working fine and then just stopped and I cannot figure out why. This is a work in progress, so the code is being developed, but I can't see why this would start happening all of a sudden.

I have tried clearing firefox cache and also tried in Chrome.

I also tried creating a button on screen1 with id of "clickme" that is hidden. And I changed the onload for that screen to pui.click("clickme"). Still, screen2 and 3 are "auto advancing".

I can require the user to press a button on screen1, but I am trying to avoid doing that.

Any thoughts/help would be appreciated, thanks!

Kev
ECTS_Kevin
New User
Posts: 6
Joined: Tue May 01, 2018 12:57 pm
First Name: Kevin
Last Name: Nunn
Company Name: Eclipse Consulting
Contact:

Re: Odd ONLOAD behavior

Post by ECTS_Kevin »

I tried adding a write of the main screen (screen0) right after the exfmt of screen1 and that solves the issue.

So code flow is now:
exfmt screen0 - main program display
exfmt screen1 (just display, no buttons or inputs - with ONLOAD set to pui.click() )
write screen0
call program (does not use screen at all)
exfmt screen2 - windowed - informational display with button to continue
exfmt screen3 - windowed - informational display with button to continue

Doing the write of the main screen seems to be clearing the ONLOAD.

Kev
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Odd ONLOAD behavior

Post by Scott Klement »

I think the JavaScript and screen code would be much more useful than the RPG code? But, as I haven't seen it, it's hard to know for certain.

From your description, if I had to take a wild guess, I'd say some JavaScript code (from the display file) is running in the background on a timeout or interval timer or similar, and you are not waiting for it to complete before moving on to drawing the next couple of screens, so it ends up running during screen3, and therefore is submitting it.

If you want further help, we're going to need to know all of the details that are necessary for us to create a screen that has the same problem as yours. i.e. enough information that we can write what you have.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests