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     Is it possible to launch a 2nd IE session with a message in it?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Is it possible to launch a 2nd IE session with a message in it?
 Login/Join
 
Platinum Member
posted
Hi,

When we submit our reports to HMTL output or Excel output a new window is launched which the data will be displayed in.

We would like to launch a second IE window with a message if the report has returned more than X number of rows.

I have coded a check on &LINES at the end of the report, and if the requirement is met I wish to output the following:

-HTMLFORM BEGIN
Report ABC ran for more than X minutes. Please contact xxx.
-HTMLFORM END

However this does not create 2nd window, it just appends the message to the bottom of the report results. Is there any way to launch a 2nd window?


WebFocus 765. iSeries v5r4
 
Posts: 175 | Location: England | Registered: April 11, 2006Report This Post
Expert
posted Hide Post
Here's one way to do it (Change the value of the DM variable &THRESHOLD to a number less than 5 or greater than 4 to see the difference in message/no message behaviour):

-SET &THRESHOLD = 3;

TABLE FILE CAR
SUM
SALES
BY COUNTRY
END
-RUN
-SET &NB_LINES = &LINES;

-SET &ONLOADFUNC = IF &NB_LINES GT &THRESHOLD THEN 'DisplayMsg1();' ELSE '';

-HTMLFORM BEGIN
<HTML>
<HEAD>
<SCRIPT language="JavaScript">
function DisplayMsg1()
{
var vWinFeatures = "height=50,width=300,left=45,top=45,menubar=no,toolbar=no,status=yes,resizable=yes,scrollbars=yes";

winMsgWindow = window.open("","winMsgWindow", vWinFeatures);
winMsgWindow.document.writeln('the report has returned more than !IBI.AMP.THRESHOLD; number of rows');
}
</SCRIPT>
</HEAD>
<BODY onload="!IBI.AMP.ONLOADFUNC;">
</BODY>
</HTML>
-HTMLFORM END


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
Platinum Member
posted Hide Post
We too could use this simple, yet fine example Francis, Thank you.
And Thx to you too Mark, for asking the Q.
Nice Thread
Sandeep Mamidenna


-------------------------------------------------------------------------------------------------
Blue Cross & Blue Shield of MS
WF.76-10 on (WS2003 + WebSphere) / EDA on z/OS + DB2 + MS-SQL
MRE, BID, Dev. Studio, Self-Service apps & a dash of fun !! Music
 
Posts: 218 | Location: Jackson, MS | Registered: October 31, 2006Report This Post
Expert
posted Hide Post
After the second window is opened with the window.open JS, the html inside the new window can be as elaborate as you want, just add more document.writeln JS commands.


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
Platinum Member
posted Hide Post
Thanks Francis, that's great. However it only appears to work when the output is for HTML, when outputting to Excel or PDF, it does not launch the message window? Will this be possible?

At the end of all our reports, we make a call to a 'INCLUDE FINISH'. This program updates a log file with some runtime stats, such as endtime, rows returned etc. It is at the top of this program that I have placed your code. Does it need to be moved?

Example:

TABLE FILE ABC
PRINT
...
...
...
$
TYPE=ACROSSTITLE,
SIZE=9,
$
TYPE=GRANDTOTAL,
BACKCOLOR=RGB(210 210 210),
$
ENDSTYLE
END
-RUN
-INCLUDE FINISH
-EXIT

-* File finish.fex
-HTMLFORM BEGIN
<HTML>
<HEAD>
<script language="JavaScript">
function DisplayMsg1()
{
var vWinFeatures = "height=50,width=300,left=45,top=45,menubar=no,toolbar=no,status=yes,resizable=yes,scrollbars=yes";

winMsgWindow = window.open("","winMsgWindow", vWinFeatures);
winMsgWindow.document.writeln('the report has returned more than !IBI.AMP.THRESHOLD; number of rows');
}
</SCRIPT>
</HEAD>
<BODY onload="!IBI.AMP.ONLOADFUNC;">
</BODY>
</HTML>
-HTMLFORM END

Many thanks

Mark

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


WebFocus 765. iSeries v5r4
 
Posts: 175 | Location: England | Registered: April 11, 2006Report This Post
Expert
posted Hide Post
mark, you need to put code tags around the html in your post, otherwise we can't read it all.
-s
francis, applause. another T.O.T.Y. award!
f, how would i get a window name on that little pop up? In an ordinary html page, i would use the
<title>page title here </title>
in the head section of the htmlform.
I would like to give a nicer title to this pop up window than the default server name..etc.

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




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Platinum Member
posted Hide Post
Susannah,

This works when you add the following line to Francis' script:

winMsgWindow.document.write('<HTML><TITLE>page title here</TITLE></HTML>');


Regards,
Sean


------------------------------------------------------------------------
PROD: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
TEST: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
 
Posts: 210 | Location: Ottawa | Registered: November 03, 2005Report This Post
Master
posted Hide Post
Here is what I would suggest. Using a combination of JavaScript and WebFOCUS code. Run the Report and hold it to a temp location that gets cleand up say after x number of hours. Then at the end of the report where you check &LINE if you want to open a message windows then put a button on it that says something like "Display Report" at which time you call and display the saved report file. else you just display the saved report file.




Scott

 
Posts: 865 | Registered: May 24, 2004Report This Post
Expert
posted Hide Post
is that ever great! thanks Sean, and applause to all 3 of you.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Platinum Member
posted Hide Post
quote:
Originally posted by susannah:
mark, you need to put code tags around the html in your post, otherwise we can't read it all...
Done Smiler

Texas, that does sound like a good suggestion, but for the moment we still want to launch this second window if possible. I just need to know how to make it happen when outputting to a format other than HTML?


WebFocus 765. iSeries v5r4
 
Posts: 175 | Location: England | Registered: April 11, 2006Report This Post
Master
posted Hide Post
If you your output is HTML then you would have to use the code provided. If the output is EXCEL then you would have to use an excel template and code a macro to diaplsy a message. If the output is PDF I don't know what you would have to do it there is anything. My Suggestion above would work for what ever your output format is.




Scott

 
Posts: 865 | Registered: May 24, 2004Report This Post
Expert
posted Hide Post
If you're able to grab the computername of the user ( i don't know how to do that..but there must be a way)
then
CMD NET SEND computername YOUR MESSAGE HERE
-RUN
sends an alert box to the computername
and can be sent mid-fex and doesn't involve an HTMLFORM effectively stopping the processing.
You would issue it after your extract file and before your final file preparation (whatever format)
Our network is cisco and our server win2k or win2k3, if that helps.
I use this command with my own computername hardcoded in it to alert me to some things my users are doing. kinda sneaky.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report 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     Is it possible to launch a 2nd IE session with a message in it?

Copyright © 1996-2020 Information Builders