Focal Point
[SOLVED]wf8- getting the parent html background color

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

September 27, 2013, 07:19 AM
Jay Potter
[SOLVED]wf8- getting the parent html background color
I have a wf8 composer html form calling another composer html page and putting it into a frame. When I create both of them in dev studio, they are using the default background color. When the first composer form is ran in the portal, the background color is the theme color. When it calls the second composer html page, it uses the default dev studio color instead of the theme color. This also happens when you call a new composer html page and you open a new window. The theme color is not used in the new window.

How do I get the parent html page color so that I can pass it to the child page?

This message has been edited. Last edited by: Jay Potter,


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
September 30, 2013, 10:42 AM
R.Bright
Check the status of "Dynamic Report Styling" in the Portal Designer. If it is selected it will override colors established in the HTML Composer with those established in the applied Portal Stylesheet.


Robert Bright

Owner, Sr. Business Intelligence Consultant
Bright Ideas Consulting
brightideasbiconsulting@gmail.com
513.265.7235
October 01, 2013, 01:20 PM
Jay Potter
Thanks for trying!

That is already checked. It seems to work th e parent forms but not for the children of the parent form


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
December 03, 2013, 03:54 PM
Rob Bowen
You could add the following to the second composer page to the window_onload function.

   var heads = document.getElementsByTagName('head');
   var styleArray = parent.document.getElementsByTagName('style');
	var linkArray = parent.document.getElementsByTagName('link');
   for(var i=0; i<heads.length; i++) {
     for(var j=0; j<styleArray.length; j++)
	    heads[i].appendChild(styleArray[j].cloneNode(true));
     for(var j=0; j<linkArray.length; j++)
       heads[i].appendChild(linkArray[j].cloneNode(true));
   }



WebFOCUS 8.1.04; SQL Server 2012; Windows 7; Windows Server 2012 R2;
December 04, 2013, 07:09 AM
Jay Potter
That worked!!!! You just made my morning.

Thank You


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster