The topic of wait messages has been discussed before but I'm not sure if animated GIFs was addressed. In short, I have not found a way to show animated GIFs on a wait page. The technique I use does not seem to work with animated GIFs. I think standard browser behavior stops animated GIFs when the browser window is told to go to antoher web page even if that web page (or report results) take some time to come back.
The following is some code to create a wait message page with the technique I use. Make the following changes to use it at your site.
1) Put the HTML files in a directory which can be reached by the web server.
2) Put the FOCEXEC in a directory that is in the APP PATH.
3) Change the word "tststuff" in the URL path in the RUNIT() function in WAITMENUPAGE.HTM to the directory where WAITMESSAGE.HTM is located.
WAITMENUPAGE.HTM
<HTML>
<HEAD>
<TITLE>Wait Message Menu</TITLE>
<!---------------------------------------------------------------------->
<SCRIPT>
function setapprndm() {
apprndm=Math.random();
document.THEDATA.WFS_apprndm.value=apprndm;
}
<!---------------------------------------------------------------------->
function preparefrm() {
setapprndm();
document.THEDATA.IBIF_ex.value =document.THEFORM.IBIF_ex.value;
runit();
}
<!---------------------------------------------------------------------->
function runit()
{
Today = new Date();
nmewindow = "win" + Today.getMinutes() + Today.getSeconds() +
Today.getMilliseconds();
optwindow = "toolbar=no,location=no,status=yes,menubar=yes," +
"scrollbars=yes,width=700,height=450,left=50,top=5,resizable=yes";
document.THEDATA.target = nmewindow;
rptwindow=window.open("/tststuff/waitmessage.htm",nmewindow,optwindow);
}
</SCRIPT>
</HEAD>
<!---------------------------------------------------------------------->
<body style="background-color:#3434ff">
<DIV ALIGN="center">
<!---------------------------------------------------------------------->
<FORM name="THEFORM" target="_blank">
<table>
<tr>
<td ALIGN="center"><b>Please select a report:</b></td>
</tr>
<tr>
<td ALIGN="center" valign="top">
<select name="IBIF_ex" size="5">
<option value="waitcarloop" SELECTED>Run a test FOCEXEC that takes a few seconds</option>
</td>
</tr>
<tr>
<td ALIGN="center" width="25%">
<input type="button" id="SUBBUTN" value="Submit" onclick="preparefrm();">
</td>
</tr>
</table>
</form>
<!---------------------------------------------------------------------->
<form name="THEDATA" action="/cgi-bin/ibi_cgi/webapi.dll" method="POST" target="_blank">
<input type="hidden" name="WFS_apprndm" value="">
<input type="hidden" name="IBIF_ex" value="">
</form>
<!---------------------------------------------------------------------->
</BODY>
</HTML>
WAITMESSAGE.HTM
<HTML>
<HEAD>
<TITLE>Processing your request, please wait.</TITLE>
</HEAD>
<SCRIPT>
function subit() {
window.opener.document.THEDATA.submit();
}
</SCRIPT>
<body onload="subit()">
<br><br>
<center><strong><font size=5 color='#800000'>
Your request is being processed.
<p></p>
Please wait...
</font></strong></center>
</BODY>
</HTML>
WAITCARLOOP.FEX
-REPEAT CARLOOP 100 TIMES
TABLE FILE CAR
PRINT RCOST DCOST
BY COUNTRY
BY CAR
BY MODEL
BY BODYTYPE
ON TABLE HOLD AS CARHOLD
END
-RUN
-CARLOOP
Thanks!
Mickey
| FOCUS/WebFOCUS 1990 - 2011 |