As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
I have an HTML drop down control being dynamically populated from an XML fex file. The display value is the report name and the actual value is a fex url. This part is working fine.
What i am trying to do is when I click on a selection that URL is loaded into the Iframe in my html page. Does anyone know how to accomplish this?This message has been edited. Last edited by: FP Mod Chuck,
WebFOCUS 8 Windows, All Outputs
Posts: 49 | Location: United States | Registered: April 21, 2015
I would just create another fex file and use an HTMLFORM to display the variable, like so:
-HTMLFORM BEGIN &URL -HTMLFORM END
This fex would be placed in the desired panel.
You also will need to add some javascript to refresh the panel displaying the URL on change of the drop down value. I can post some code if needed for that.
Matt
WebFOCUS 8.201m Windows, All Outputs
Posts: 28 | Location: Indiana | Registered: June 08, 2016
Ah. You cannot force an iframe to display another website if it has a different source than the website you're currently on. That would violate all sorts of security features. However, if the URL is of the same source you could use some basic javascript to load it:
quote:
-HTMLFORM BEGIN <script> window.location.href = "&URL" (end script tag here) -HTMLFORM END
If you are trying to load a URL of a different source I would suggest having it open in a new tab after click of a button or change of a drop down value.
WebFOCUS 8.201m Windows, All Outputs
Posts: 28 | Location: Indiana | Registered: June 08, 2016
Thanks I will try that. I was testing the functionality using google and other things which was likely my problem since it worked when forced a new window but no when I loaded onto current page.
Can I bring it into the iframe if it is the company domain but not webfocus? We have some legacy reports that aren't housed in WF but are still located on mycomany.com domain.
You also mentioned some javascript to refresh the frame I would be very interested in that if you could share. I appreciate the help!
WebFOCUS 8 Windows, All Outputs
Posts: 49 | Location: United States | Registered: April 21, 2015
I believe it is possible to grant iframe permission on a webpage. It has something to do with X-Frame-Options. Take a look here. The javascript error I receive when trying to view google in a iframe is
quote:
Refused to display 'https://www.google.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.
It looks like you just need to change the X-Frame-Options setting in your webpage (mycompany.com) to ALLOW-FROM wherever your request is being made from.
Also, here is some starter code that will help you refresh panels on change of a drop down value:
quote:
function refreshReports() { var name = this.window.name; var iframeArray = ["Tab_0_1"]; parent.BipIframeInterface.setAllAmpersValues(name, IbComposer_getAllAmpersValues()); parent.BipIframeInterface.refresh(parent.BipIframeInterface.REFRESH_ARRAY, name, iframeArray); }
Let me know if you have further questions,
Matt
WebFOCUS 8.201m Windows, All Outputs
Posts: 28 | Location: Indiana | Registered: June 08, 2016