Focal Point
report preloader ("loading... please wait")

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

March 01, 2006, 02:47 PM
jbmuir
report preloader ("loading... please wait")
Here is my contribution to the "please wait" examples. This combines Mickey Grackins javascript, and Ruben Ruedas "please wait" page with a slight difference that I think is an improvement.

One disadvantage of Ruben's approach is that a page is inserted into the browser history. This sort of thing affects the behaviour of the browser "back" button, and is something to be avoided (at least with my customers :-)). Mickeys method avoids the spurious page being placed in the browser history.

Here is my code. The javascript is excerpted from a larger library as is shown here:

// ----------------------------------------------------------------------
// pleasewait: display a "please wait" message in a window.
// ----------------------------------------------------------------------

function pleasewait ()
{
var features = 'height=100,width=400';

var url = '/baseapp/plswait.htm';

window.open(url, 'plswait', features);
}


Here is Rubens modified HTML page:

<html>
<head>
<title>
Please Wait
</title>
</head>
<body onblur="self.close();">
<center>
<table border=0 cellpadding=0 cellspacing=0 width="250"><tr><td>
<table cellpadding=2 cellspacing=1 border=0 width="100%"><tr><td>
<center>
<font size="2" face="Verdana, Arial, Helvetica, sans-serif">Cargando datos</font>
<br><img src="path/to/progress.gif" border="0" width="200" height="26"><br>
<font size="2" face="Verdana, Arial, Helvetica, sans-serif">Espere por favor...
</font>
</center>
</td>
</tr>
</table>
</td></tr>
</table>
</center>
</body>
</html>


One difference is the addition of the onblur="self.close()" on the body tag. This causes the "please wait" window to be closed when the window goes out of focus. Normally this will occur when the query results are returned to the user.


WF 7.1.6 moving to WF 7.7, Solaris 10, HTML,PDF,XL
April 18, 2008, 11:38 AM
Darin Lee
Just thought I'd try to keep the threed going a little longer!

I recently tried to incorporate this functionality into an application and succesfully used the code posted by Francis and was very pleased. However, it will only work properly (so far as I have found) on machines using IE 6 browsers. When using IE7, the

body onload="init();window.opener.document.wcf1.submit();"

does not seem to work. The Please wait page pops up, but the job is never submitted to WF.

Anyone had the same experience or know what the problem may be?


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
April 18, 2008, 12:09 PM
Francis Mariani
I haven't dared upgrade to Vista or IE 7 so I don't have an opportunity to test th JS, but I'll try it on Firefox, Safari and whatever other web browser I have around.


Meanwhile, based on a completely unrelated issue (perhaps not so unrelated?) I found I could make something work by delaying execution for a few milliseconds. I haven't tried this yet for the Please wait message, but give this a try, the init and submit run after a 250 millisecond delay (it adds a quarter second to the process, increase the time a bit if that doesn't work, it is also possible it won't work at all):

body onload="setTimeout('init(); window.opener.document.wcf1.submit();', 250);"

or try delaying the submit after the delay:

body onload="init(); setTimeout('window.opener.document.wcf1.submit();', 250);"


Perhaps this may work because it gives the web browser time to execute the init function before the form submit. I don't have any knowledge of the intricacies of web browsers.


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
April 19, 2008, 01:27 AM
Alan B
Another approach to running multiple onload events is to use attachEvent:
function addEvent(obj, evType, fn){
 if (obj.addEventListener){
    obj.addEventListener(evType, fn, true);
    return true;
 } else if (obj.attachEvent){
    var r = obj.attachEvent("on"+evType, fn);
    return r;
 } else {
    return false;
 }
}
addEvent(window, 'load', init);
addEvent(window, 'load', function() {
 document.getElementById('submitForm').submit()
});

which is x-browser compliant.
(though the DX Transforms are IE only)


Alan.
WF 7.705/8.007
April 21, 2008, 06:26 AM
Motiejus
Darin,


you can try using plain JavaScript call somewhere on the bottom of your HTML, for example:
<script>
window.opener.document.wcf1.submit();



Motiejus Jankevicius
April 21, 2008, 11:57 AM
Francis Mariani
A complete example, tested on IE 6 and Firefox 2:
A simple "Please Wait" message WITH an animated image!


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
September 03, 2013, 09:38 AM
gregv
So to open this thread, again...
Several years later we now have a automatic "Loading, Please wait..." message supplied when ever a fex is run in an iframe.
Does any one know how to turn this message off?
Can it be done for one iframe (a small one where this message gets garbled) but not for others on the page?
Thanks, G



Greg



current client: WF 8.1.05 & 8.2 - Windows 7 64bit - Tomcat 7 - MRE / BID - IE11

local: WF 8.2 - Windows 7 64bit - Tomcat 6 - MRE / BID - FOCUS - IE11

PMF 8