Focal Point
[CLOSED] Avoding Quirks Mode

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

March 30, 2012, 05:00 PM
gyang
[CLOSED] Avoding Quirks Mode
Having trouble with our html file because WebFOCUS requires syntax < !-- Generated by Report Layout Painter --> to be the first line in the html, but without having < !DOCTYPE HTML> as the first line, IE switches to quirks mode. In quirks mode we lose the IE9/HTML5 features. Have anyone seen this problem or solve this problem? Thanks!

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


8002M
Window/excel/pdf/html/ahtml
April 02, 2012, 10:57 AM
njsden
This looks rather silly but may help.

How about creating a wrap .fex you can use to create the DOCTYPE you require before invoking your HTML Composer-created page?

Say you have an HTML page called mypage.htm .

You could create a procedure called loadmypage.fex with a content such as this:

-HTMLFORM BEGIN
<!DOCTYPE HTML>
-HTMLFORM END

-HTMLFORM mypage.htm



Now, if your HTML is *not* in a Managed Reporting domain but hosted in the Reporting Server you could actually create a generic wrap procedure that you'd use to load just about any HTML file via a parameter:

-DEFAULT &P_PAGE = 'mypage.htm'

-HTMLFORM BEGIN
<!DOCTYPE HTML
-HTMLFORM END

-* Load htm file
-HTMLFORM &P_PAGE



Hope this helps.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
April 09, 2012, 09:07 AM
gyang
thank you njsden, I will give it a try.


8002M
Window/excel/pdf/html/ahtml
April 09, 2012, 12:15 PM
dhagen
I think I solved this last night. I am working on a similar issue where I needed to remove the comment, and replace the DOCTYPE reference with:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
to open up style options.
I wrote a filter to intercept the HTML write commands from Dev Studio for both MRE and self service requests. Seems to be working fine at this time with minimal testing. Just work as normal, and click Save. The process does the rest. I will share if you want to be a tester for this.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
April 09, 2012, 10:06 PM
njsden
I wouldn't mind being a guinea pig on this one ... it's all for a good cause Wink



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
April 09, 2012, 11:04 PM
dhagen
email?


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
April 10, 2012, 12:36 PM
gyang
dhagen,
do you mind sharing your filter and instruction on how you acheive this? This would be so great for us so we can style our html pages. My email is gyang@plex.com. Thanks!


8002M
Window/excel/pdf/html/ahtml
April 10, 2012, 01:51 PM
dhagen
On its way. Let me know if you have problems.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
April 10, 2012, 02:19 PM
njsden
njsden@yahoo.com

Thanks.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
September 07, 2012, 02:12 PM
J.Hines
I'm creating AHTML reports and though it's not coming through with the comment you noted, and even with a DOCTYPE declaration of
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 

something is still triggering quirks mode in IE, which as you noted greatly affects styling possibilites. The report works fine in Firefox (which unfortunately most of our users don't use).

Any suggestions on what I can do?

This message has been edited. Last edited by: J.Hines,



Prod: 8.2.0.4 OS:Windows 10 Output:AHTML, Excel 2007+

The life of a designer is a life of fight against the ugliness.
September 07, 2012, 04:15 PM
Francis Mariani
J, how do you apply this doctype? The only way I think of is to add an -HTMLFORM BEGIN and -HTMLFORM END with the doctype within (which is where I also have the css styling you so generously shared in your other recent post). The problem with this is that there are two HTML tags in the same file, one for the report and one in the HTMLFORM, which might be a problem...


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 10, 2012, 08:01 AM
J.Hines
Oh, I was just saying that's the default DOCTYPE created, unfortunately I have no control over it. I thought about the HTMLFORM idea, but I don't think that would work for me since I'm not calling an HTML report, but an AHTML procedure. And you're probably right, two DOCTYPE declarations wouldn't be a good thing.

dhagen, do you still have your solution lying around?



Prod: 8.2.0.4 OS:Windows 10 Output:AHTML, Excel 2007+

The life of a designer is a life of fight against the ugliness.