I am building a new application. In the page displaying the menu there are two hyperlink and an iframe in the center of the page.
I want that hyperlink target be the iframe content. how to do is with Profoundui (and RPG)? Thanks for your advanced posts.
IFRAME AND HYPERLINK TARGET IN PROFOUNDUI
-
- New User
- Posts: 2
- Joined: Fri May 30, 2014 6:18 am
- First Name: cheikh
- Last Name: diop
- Company Name: sonam sa
- Contact:
-
- 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: IFRAME AND HYPERLINK TARGET IN PROFOUNDUI
There are two alternative ways:
1) If no RPG logic is needed (database access or whatnot) you can do this entirely in the JavaScript of the display file.
Make sure nothing is assigned to the 'response' element of the hyperlink. Then, set the 'onclick' property to something like this:
The first line changes the URL of the iframe. The second line forces the iframe to re-render (re-draw itself on the screen.) Most Profound UI widgets draw themselves when their field type is altered, so setting the field type (to the same value it already had) makes it re-draw.
Repeat this process for each hyperlink you want to use to control the iframe.
2) If RPG logic is wanted/needed, bind an indicator to the 'response' property of the hyperlinks, and bind a character field to the "iframe url" property of the iframe. When the user clicks the link, control will return from the EXFMT... the RPG code can then check the hyperlink indicators, and if one is turned on, set the iframe URL accordingly. When you EXFMT the screen again, it'll show the iframe pointing to the link... nice thing about doing this in the RPG code is that you can use any method you want in the RPG code to calculate the iframe URL (including database lookups, etc.)
Good luck
1) If no RPG logic is needed (database access or whatnot) you can do this entirely in the JavaScript of the display file.
Make sure nothing is assigned to the 'response' element of the hyperlink. Then, set the 'onclick' property to something like this:
Code: Select all
applyProperty("id-of-iframe", "iframe url", "http://www.profoundlogic.com");
applyProperty("id-of-iframe", "field type", "iframe");
Repeat this process for each hyperlink you want to use to control the iframe.
2) If RPG logic is wanted/needed, bind an indicator to the 'response' property of the hyperlinks, and bind a character field to the "iframe url" property of the iframe. When the user clicks the link, control will return from the EXFMT... the RPG code can then check the hyperlink indicators, and if one is turned on, set the iframe URL accordingly. When you EXFMT the screen again, it'll show the iframe pointing to the link... nice thing about doing this in the RPG code is that you can use any method you want in the RPG code to calculate the iframe URL (including database lookups, etc.)
Good luck
-
- New User
- Posts: 2
- Joined: Fri May 30, 2014 6:18 am
- First Name: cheikh
- Last Name: diop
- Company Name: sonam sa
- Contact:
Re: IFRAME AND HYPERLINK TARGET IN PROFOUNDUI
Thanks your advanced responses. I will try to do one of these methods.
Who is online
Users browsing this forum: No registered users and 7 guests