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.
To the javascripters out here, I was hoping you can help me out.
I am running off of a private dashboard. In this dashboard, I have an html that has a form where a user chooses some filters, clicks run, and the fex runs to display a report on the iframe below. Pretty standard.
This report on the iframe has a multidrill menu item that opens with TARGET=_blank.
Now, this child fex runs some processing and instead of displaying something, I want it to go ahead and refresh the parent report. I got the idea of just going ahead and use javascript to click the Run button on the form again.
I found this pretty simple on javascript if you have a drillmenuitem with TARGET=_self because I can just do a window.parent.
But, I can't figure out how to address the form from a _blank! I feel like this should be a simple matter, yet I can't figure it out.
Help?This message has been edited. Last edited by: Anatess,
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :
Hi, may be you should give the names to your windows, like TARGET='my_drill_report', so you could adress it any time in javascript as "window" object. An other idea is to use javascript object "opener".This message has been edited. Last edited by: kulibin,
WebFOCUS 7.7.03 Windows, All Outputs
Posts: 1 | Location: Germany | Registered: May 07, 2012
I tried reading your mind, but that didn't work either.
Just saying, you're not giving us a whole lot to work with.
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :
Here's the report named FP1.fex referenced in the iframe with the drilldown (used single drilldown):
-DEFAULT &CNTRY='FOC_NONE'
TABLE FILE CAR
PRINT CAR
BY COUNTRY
WHERE COUNTRY EQ '&CNTRY';
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=DATA,
COLUMN=N1,
TARGET='_blank',
FOCEXEC=FP2,
$
END
And finally, here's FP2.fex that doesn't need to display anything. Instead, it modifies the CAR file and I want this change reflected in the report of the parent or opener window by having the submit button clicked again to refresh the report:
-DEFAULT &ECHO=ALL
MODIFY FILE CAR
FREEFORM COUNTRY/A10
FREEFORM CAR/A16
MATCH COUNTRY
ON NOMATCH REJECT
ON MATCH CONTINUE
MATCH CAR
ON MATCH DELETE
ON NOMATCH INCLUDE
DATA
'ITALY', 'LAMBORGHINI',$
END
-RUN
-HTMLFORM BEGIN
<HTML>
<HEAD>
<SCRIPT id=clientEventHandlersJS type=text/javascript>
function window_onload() {
window.opener.document.getElementById("form2Submit").click();
}
</SCRIPT>
</HEAD>
<BODY ONLOAD=window_onload();></BODY>
</HTML>
-HTMLFORM END
So, window.opener here doesn't work and my analysis is, it doesn't work because the drilldown doesn't use window.open to get to the child fex.
So, I'm wondering if I'm just having a brain freeze and it's really simple mistake I'm making or if this is really not a simple thing and I need more scripting to get it to work?
And yes, I haven't had the chance to try kulibin's suggestion of passing the window id and using that to reference back.
Wep, I was hoping you can eyeball this, or try it in your installation and see where I missed something.
Ah yes, the opener is itself inside a (i)frame, after all. We really just needed more details on how you were attempting to reference the other frame, but as I suspected you stopped at window.opener and that wasn't enough.
Glad you found the solution.
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :