Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] choice of inline frame or new window for report output

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] choice of inline frame or new window for report output
 Login/Join
 
Platinum Member
posted
Currently the reports in this company all display in an inline frame within the launch page. This is very limiting. I would like to give the users a choice of having the reports display in either the inline frame or in a separate window.

Can this be done without JavaScript?

There are no JavaScript coders here, so if it can only be done with JavaScript, I would appreciate it if the JavaScript code would be posted here.

Thank you,

John

This message has been edited. Last edited by: Kerry,


WF 7.7.03, Windows 7, HTML, Excel, PDF
 
Posts: 225 | Location: San Francisco Bay Area, California | Registered: October 26, 2006Report This Post
Expert
posted Hide Post
John,

I'm not going to discuss whether or not this is a good idea - I'm sure someone else will, I'm going to provide a possible solution.

The form target attribute specifies where the form result will go. You can alter this using JavaScript, based on the selection in a form object like a radio button or a select list.

You would add a form object where the user selects the output destination - the inline frame, a new window or a named window. (If a new window is selected, the form will always open a new window; if a named window is selected, the form will open a new named window if it doesn't exist - if it does exist, the form result goes in the already opened window).

You would then add execution of a JavaScript function to the form using the onSubmit attribute.

Add the function to the HTML page, before the body tag.

An example:

<html>

<body>

<form name="form1" method="get">
Report Destination
<select name="seltarget">
  <option value="iframe1" selected="selected">Inline</option>
  <option value="_blank">New Window</option>
  <option value="winreport">Report Window</option>
</select>
</form>

<p>

<form name="form2" method="get" action="http://www.google.com/" target="iframe1"
      onSubmit="document.form2.target = document.form1.seltarget[document.form1.seltarget.selectedIndex].value;">

<input type="submit" value="Submit" />

</form>

<iframe NAME="iframe1" frameBORDER="1" width="600" height="400" scrolling="auto"></iframe>

</body>
</html>

This message has been edited. Last edited by: Francis Mariani,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
IB do this within Amper Autoprompting -

              <input id="idReportTarget" name="reportTarget" type="checkbox"/>
              <span>Run in a new window</span>

For the checkbox selection for the end user and

  if(document.getElementById("idReportTarget").checked) {
    targ = "_blank";
  } else {
    targ = "outputFrame";
  }
  document.getElementById("idWFDescribeForm").setAttribute("target",targ);
  WFDescribeForm.submit();

The only thing that I would say is that if you have no JavaScript coders then how do you plan to support any JS code you get given?

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Platinum Member
posted Hide Post
Thank you guys.

Good point, Tony.

Regards,

John


WF 7.7.03, Windows 7, HTML, Excel, PDF
 
Posts: 225 | Location: San Francisco Bay Area, California | Registered: October 26, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] choice of inline frame or new window for report output

Copyright © 1996-2020 Information Builders