execute function after profound loading
-
- 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: execute function after profound loading
Can you please post an example of this? I am not familiar with your top.html.
-
- New User
- Posts: 11
- Joined: Wed Jul 16, 2014 6:19 am
- First Name: Steve
- Last Name: Bone
- Company Name: Kuehne + Nagel
- Contact:
Re: execute function after profound loading
Here is a screenshot of our main menu.
I blacked out all costumer and company information. I hope you understand :)
Within the red markings, i described how we address elements within the frames from the view of the 5250 session.
For example: if a javascript in the current program has to access an element in frame[0] it can simply do that with an window.frame[0].getObj("element_ID");
The program in frame[0] can access elements in frame[1] by using parent.window.frame[1].getObj("element_ID");
the 5250 session shows the start.html and contains frame[0] and frame[1] as iframes.
frame[0] always shows top.html, frame[1] always shows band.html
The blue marked fields are those fields that had the problems with the onload event;
The upper field (with the label Main Menu) changes its content dynamically, depending on which program runs in the 5250 session.
Now when this field gets a specific value, the select boxes (also marked blue) should be disabled.
With each program call within the 5250 session, a javascript will execute a window.frame[0].pui.click() to make the program in the top.html get the information about the current running program
and to disable the select boxes after its exfmt.
When the onload event of frame[0] is fired due to the exfmt in its program, the upper blue framed field has no value, so it cannot properly disable the blue framed select boxes.
I blacked out all costumer and company information. I hope you understand :)
Within the red markings, i described how we address elements within the frames from the view of the 5250 session.
For example: if a javascript in the current program has to access an element in frame[0] it can simply do that with an window.frame[0].getObj("element_ID");
The program in frame[0] can access elements in frame[1] by using parent.window.frame[1].getObj("element_ID");
the 5250 session shows the start.html and contains frame[0] and frame[1] as iframes.
frame[0] always shows top.html, frame[1] always shows band.html
The blue marked fields are those fields that had the problems with the onload event;
The upper field (with the label Main Menu) changes its content dynamically, depending on which program runs in the 5250 session.
Now when this field gets a specific value, the select boxes (also marked blue) should be disabled.
With each program call within the 5250 session, a javascript will execute a window.frame[0].pui.click() to make the program in the top.html get the information about the current running program
and to disable the select boxes after its exfmt.
When the onload event of frame[0] is fired due to the exfmt in its program, the upper blue framed field has no value, so it cannot properly disable the blue framed select boxes.
-
- 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: execute function after profound loading
What updates the "upper field framed in blue"? You say it's updated dynamically, but I assume this is not being updated by the RPG program that's running in frame[0]? Can you explain how this is loaded?
-
- New User
- Posts: 11
- Joined: Wed Jul 16, 2014 6:19 am
- First Name: Steve
- Last Name: Bone
- Company Name: Kuehne + Nagel
- Contact:
Re: execute function after profound loading
In the screen of every 5250 session is a hidden field with the program name and another one in frame0.
With every onload event of the 5250 screen, a javascript puts the program name of the hidden 5250 session field into the hidden field in frame0.
After that, a window.frame[0].pui.click() is executed by the 5250 session.
The RPG program in frame0 does a chain on a physical file with the program name as key and then fills the "upper field framed in blue".
With every onload event of the 5250 screen, a javascript puts the program name of the hidden 5250 session field into the hidden field in frame0.
After that, a window.frame[0].pui.click() is executed by the 5250 session.
The RPG program in frame0 does a chain on a physical file with the program name as key and then fills the "upper field framed in blue".
-
- 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: execute function after profound loading
So the "upper field in blue" is populated by the RPG program that's doing the EXFMT. This should work fine... this field will always be filled in when the onload fires.
Make sure that:
1) when calling get() or pui.get(), you pass the ID attribute of the widget you want to retrieve (NOT the field name)
2) IDs are case-sensitive, so make sure you match the upper/lowercase exactly as it's specified in the widget.
If that still does not work, then I'm going to need to know how to reproduce the problem on my machine in order to troubleshoot it further.
Make sure that:
1) when calling get() or pui.get(), you pass the ID attribute of the widget you want to retrieve (NOT the field name)
2) IDs are case-sensitive, so make sure you match the upper/lowercase exactly as it's specified in the widget.
If that still does not work, then I'm going to need to know how to reproduce the problem on my machine in order to troubleshoot it further.
Who is online
Users browsing this forum: No registered users and 2 guests