IFRAME AND HYPERLINK TARGET IN PROFOUNDUI

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
chdiop
New User
Posts: 2
Joined: Fri May 30, 2014 6:18 am
First Name: cheikh
Last Name: diop
Company Name: sonam sa
Contact:

IFRAME AND HYPERLINK TARGET IN PROFOUNDUI

Post by chdiop »

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.
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: IFRAME AND HYPERLINK TARGET IN PROFOUNDUI

Post by Scott Klement »

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:

Code: Select all

applyProperty("id-of-iframe", "iframe url", "http://www.profoundlogic.com");
applyProperty("id-of-iframe", "field type", "iframe");
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
chdiop
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

Post by chdiop »

Thanks your advanced responses. I will try to do one of these methods.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 0 guests