Calling java function in onload from rpg

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
Sebastian
New User
Posts: 2
Joined: Mon Oct 25, 2021 7:27 am
First Name: Sebastian
Last Name: Kraft
Company Name: Loxxess
Contact:

Calling java function in onload from rpg

Post by Sebastian »

Hello.

We have a rcd format with the following java script in the onload:

Code: Select all

function runNextStep(step) {
  switch (step) {
    case 1:
      changeElementValue("ButtonSel", "B1");
      break;
    case 2:
      changeElementValue("ButtonSel", "B2");
      break;
    case 3:
      changeElementValue("ButtonSel", "B3");
      break;
    case 4:
      changeElementValue("ButtonSel", "B4");
      break;
    case 5:
      changeElementValue("ButtonSel", "B5");
      break;
    case 6:
      changeElementValue("ButtonSel", "B6");
      break;
    case 7:
      changeElementValue("ButtonSel", "B7");
      break;
    default:
      return; // kein weiterer Schritt
  }

  // führt einen Submit an das RPG-Programm aus (so als hätte der User geklickt)
  pui.click();
}
from the rpg we want to call this java function. We found the hint to do this by using pui_runscript
RPG CODE
pui_runScript('runNextStep(3);');
But it doesnt know this pui_runscript when compiling.

Does anyone know how we can do this?

Greetings
Sebastian
Post Reply

Who is online

Users browsing this forum: No registered users and 52 guests