Focal Point
[SOLVED] Page not showing default "Loading Please Wait"

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

October 22, 2015, 04:39 PM
DavSmith
[SOLVED] Page not showing default "Loading Please Wait"
Version 8.009 using Dev Studio.

Scenario:

1) Run HTML document on the Repository that loads a fex with HTMLFORM on Reporting Server

2) "Loading Please Wait"+animated gif briefly appears then disappears and a white blank page takes it's place for a few seconds (up to 5 seconds).

3) Then the "Loading Please wait" message and animated gif appears.

4) Then our HTMLFORM with our Iframe output appears.

Out issue is step 2. We want the "Loading Please Wait"+animated gif to display in the time it takes for the IFRAME to be loaded in step 4, but IBI methods for setting the BODY to loadingscreen="default" is not working.

I've seen lots of posts regarding not showing the Loading...but none on this blank page showing. Anyone run into this and resolve?

Thanks

This message has been edited. Last edited by: <Kathryn Henning>,



In FOCUS since 1985 - WF 8.009/8.104 Win 8 Outputs: ALL of 'em! Adapters: Sql Server Teradata Oracle
October 26, 2015, 01:53 PM
GavinL
We built two different types of loading pages to replace IBI's. This allows us more control and customization for each of our clients.





- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
October 28, 2015, 05:11 PM
DavSmith
Hi Gavin, our resident JS guru here, got around it by replacing the IBI HTML Composer created launch page in the repository with a bare-bones vanilla non-IBI HTML launch page, that then calls our reporting server HTMLFORM .fex. That got rid of the blank white page.

It would still be nice to control the overlays that IBI uses but this got around it.

And thanks, Gavin, for your examples.

David



In FOCUS since 1985 - WF 8.009/8.104 Win 8 Outputs: ALL of 'em! Adapters: Sql Server Teradata Oracle
November 30, 2015, 10:21 AM
David Briars
quote:
Within the pages create a span with a z-order of 99999, with text or image that you want within it. Then have a javascript function that makes the style.display='hidden' for the SPAN on the onload attribute for the body.

@Gavin - Thanks for the outline of this process. If you could post a simple code sample, showing the CSS (z-index)/JavaScript (display hidden), I'd be very grateful, as I have the same symptom as Dave described.




Pilot: WebFOCUS 8.2.06 Test: WebFOCUS 8.1.05M Prod: WebFOCUS 8.1.05M Server: Windows Server 2016/Tomcat Standalone Workstation: Windows 10/IE11+Edge Database: Oracle 12c, Netezza, & MS SQL Server 2019 Output: AHTML/XLSX/HTML/PDF/JSCHART Tools: WFDS, Repository Content, BI Portal Designer & ReportCaster
December 02, 2015, 07:41 AM
GavinL
I've had to change names of fexes, var names, ect, before I can post it, so excuse any accidental deletes of text, that might not make sense.

1. We own the license to use Restful Services, so if you don't have that license, the URLs, the way I'm using them will not work for you.
2. Below History and Comments are slow searching, where the rest of it is very quick, so we don't load History and Comments unless they click on the tab, which directs them to this "redirect.fex".
3. please_wait.png below is the image that shows up, until which time the page is done loading all the iframes.
4. Each of the iframe fex's being loaded, load data into FOCCACHE so that the next redirect will be instant, we don't go back out to the data source and get it again. Update: The pages that this code below redirects too, only reads from FOCCACHE.
5. You will see a setTimeout function being called. This is because, if the data is already loaded in FOCCACHE, we didn't want the image showing up, slowing the page down, so we give the page a second to redirect with not image flashing in the middle.
6. You will notice that we have a style for each iframe of "display: &DISPLAY", this is so we can change it for debugging purposes allowing us to see the data being loaded as they will always be hidden in production. Changing the default to 'block' will cause all iframes to show up on the screen.

Let me know if you have any questions.

-DEFAULTH &DIRECTTO = 'UserHome';
-DEFAULTH &LN = '0123456789';
-DEFAULTH &SDT = '2015-12-01';
-DEFAULTH &ROOTPATH = '/ibi_apps/rs/ibfs/WFC/Repository/UserLookup/';

-*Set &DISPLAY to 'block' for debugging, 'none' for processing ready.
-DEFAULTH &DISPLAY = 'none';

-HTMLFORM BEGIN
<html>
<script type="text/javascript" src="&ROOTPATH.EVALjs/common.js?IBIRS_action=run"></script>

<script>
function redirect()
{
	var href = 'empty';
	if('&DIRECTTO.EVAL'=='UserHome')
		href='&ROOTPATH.EVALSearch/UserHome.fex?IBIRS_action=run&|LN=&LN.EVAL&|SDT=&SDT.EVAL';
	else if('&DIRECTTO.EVAL'=='UserDetail')
		href='&ROOTPATH.EVALSearch/UserDetail.fex?IBIRS_action=run&|LN=&LN.EVAL&|SDT=&SDT.EVAL';
	else if('&DIRECTTO.EVAL'=='LiveSearch')
		href='&ROOTPATH.EVALSearch/LiveSearch.fex?IBIRS_action=run&|LN=&LN.EVAL&|SDT=&SDT.EVAL';
	else if('&DIRECTTO.EVAL'=='Comments')
		href='&ROOTPATH.EVALSearch/Comments.fex?IBIRS_action=run&|LN=&LN.EVAL&|SDT=&SDT.EVAL';
	else if('&DIRECTTO.EVAL'=='History')
		href='&ROOTPATH.EVALSearch/History.fex?IBIRS_action=run&|LN=&LN.EVAL&|SDT=&SDT.EVAL';
	else
	{
		alert('Incorrect parameters have been passed.');
		href='&ROOTPATH.EVALSearch/SearchResults.fex?IBIRS_action=run';
	}

	if('&DISPLAY'=='none')
		location.href = href;
}

function showLoading()
{
	var hold = document.getElementById("HoldPlease");
	if('&DISPLAY'=='none')
		hold.style.display = 'inline';
}
</script>

<body onload="redirect()" style="color: #2b2b2b;">
	<div id="HoldPlease" style="line-height: 30px; vertical-align: middle; z-index: 99; display: none; position: absolute; width: 95%; text-align: center; top: 150px; font-family: Segoe UI; font-size: 20px;">
         <img style="z-index: 99;" src="&ROOTPATH.EVALSearch/images/please_wait.png?IBIRS_action=run" width="150px"><br/><br/>Processing Request...
        </div>
	
	<iframe style="display: &DISPLAY; z-index: 1;" src="&ROOTPATH.EVALSearch/data/getUserHome.fex?IBIRS_action=run&|LN=&LN.EVAL&|SDT=&SDT.EVAL"></iframe>
	<iframe style="display: &DISPLAY; z-index: 2;" src="&ROOTPATH.EVALSearch/data/getUserDetail.fex?IBIRS_action=run&|LN=&LN.EVAL&|SDT=&SDT.EVAL"></iframe>
	<iframe style="display: &DISPLAY; z-index: 3;" src="&ROOTPATH.EVALSearch/data/getLiveSearch.fex?IBIRS_action=run&|LN=&LN.EVAL&|SDT=&SDT.EVAL"></iframe>
	<iframe id="userComments" style="display: &DISPLAY;" src="#"></iframe>
	<iframe id="internalComments" style="display: &DISPLAY;" src="#"></iframe>
	<iframe id="historyFrame" style="display: &DISPLAY;" src="#"></iframe>

	<script>
		if('&DIRECTTO.EVAL'=='Comments')
		{
			var userComments = document.getElementById('userComments');
			var internalComments = document.getElementById('internalComments');

			userComments.src="&ROOTPATH.EVALSearch/data/getUserComments.fex?IBIRS_action=run&|LN=&LN.EVAL&|SDT=&SDT.EVAL";
			internalComments.src="&ROOTPATH.EVALSearch/data/getInternalComments.fex?IBIRS_action=run&|LN=&LN.EVAL&|SDT=&SDT.EVAL";
		}
		else if('&DIRECTTO.EVAL'=='History')
		{
			var historyData = document.getElementById('historyFrame');

			historyData.src="&ROOTPATH.EVALSearch/data/getHistoryData.fex?IBIRS_action=run&|LN=&LN.EVAL&|SDT=&SDT.EVAL";
		}
		setTimeout(function(){ showLoading(); }, 1000);
	</script>
</body>
</html>
-HTMLFORM END

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



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
December 02, 2015, 04:34 PM
David Briars
Thank you Gavin! Excellent share/food for thought.