Focal Point
[SOLVED] generating a Windows dialog box

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/580102703

December 02, 2009, 12:49 PM
JohnB
[SOLVED] generating a Windows dialog box
Is it possible for a focexec to generate a Windows dialog box with a specific message (one or more lines of text using variables to supply certain values)? I think PC FOCUS had a way of doing something similar.

Thank you,

John

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


WF 7.7.03, Windows 7, HTML, Excel, PDF
December 02, 2009, 04:15 PM
Waz
As WebFOCUS workin in a browser, you are limited to what a browser can do.

Simple answer is Yes, with Javascript or VB script.

This is not pretty, but gives the basic idea.

-SET &Mess = 'My Report is done!' ;
TABLE FILE CAR
PRINT COUNTRY
CAR MODEL
END

-HTMLFORM BEGIN
<script language="JavaScript">
<!--
alert('&Mess');
//-->
</script>
-HTMLFORM END



Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

December 02, 2009, 05:23 PM
JohnB
Excellent! This just what I was looking for -- simple and short!

Thanks, Waz!


WF 7.7.03, Windows 7, HTML, Excel, PDF
December 02, 2009, 05:45 PM
Doug
Come On Waz... What's NOT "Pretty" about that... It's "Beautiful"...




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
December 02, 2009, 05:54 PM
Waz
Whats not pretty is the structure of the HTML page, do a view source and have a look.

Don't know if it will work for all browsers.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

December 02, 2009, 09:01 PM
Doug
Waz: I think you're being too hard on yourself (which may be a good thing). But, then again, maybe I'm too tolerant... Either way. It works fine from the WebFOCUS perspective which was the basis of my "What's NOT 'Pretty' about that..." comment... The bottom line: It's in my library now, as is. So, please let me know if you make it "prettier".
Thanks...
December 03, 2009, 03:06 PM
JohnB
Is there a way to change the text in the title bar of the dialog box?

Thank you,

John


WF 7.7.03, Windows 7, HTML, Excel, PDF
December 03, 2009, 03:57 PM
Waz
As this is a Javascript function you are limited.

but you may be able to do a lot more with things line modal dialog boxes.

These sort of questions are for other forums, as it is not a WebFOCUS thing, its a Web/Browser thing.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

December 03, 2009, 04:20 PM
Francis Mariani
Prettified, using jQuery:

-SET &MESS = 'My report is done!' ;
TABLE FILE CAR
PRINT COUNTRY
CAR MODEL
END
-RUN

-HTMLFORM BEGIN
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script><!-- jQuery -->

<script type="text/javascript" src="http://labs.abeautifulsite.net/projects/js/jquery/alerts/demo/jquery.alerts.js"></script><!-- jQuery Alerts -->
<link rel="stylesheet" type="text/css" href="http://labs.abeautifulsite.net/projects/js/jquery/alerts/demo/jquery.alerts.css" /><!-- jQuery Alerts -->

<script type="text/javascript">

$(document).ready(function()
{
jAlert('!IBI.AMP.MESS;', 'Application Message');
}); // JQuery
</script>
</head>

-HTMLFORM END


jQuery: The Write Less, Do More JavaScript Library

jQuery Alert Dialogs


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