Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Drilldowns and Jquery and HTMLFORM

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Drilldowns and Jquery and HTMLFORM
 Login/Join
 
Guru
posted
I have a report is in HTML format using multiple drilldowns. It runs inside a frame on an HTML page, and it works fine. Now I want to style that report using JQuery Themes. In order to be able to put in the SCRIPT tags that JQuery needs, I took my report and added ON TABLE HOLD AS filename FORMAT HTMTABLE, and at the end of the code I used HTMLFORM BEGIN followed by !IBI.FIL.filename followed by HTMLFORM END. The report displays as expected, but the drilldowns no longer work, and I think it's because the IBI-generated javascript is not there any more. Has anyone downe anything like this?

This message has been edited. Last edited by: Mike in DeLand,


Webfocus 8
Windows, Linux
 
Posts: 258 | Location: Palm Coast, FL | Registered: February 05, 2010Report This Post
Guru
posted Hide Post
First off, you don't have to hold as format HTMLTABLE, you can just hold as format HTML.

Secondly, what kind of drill downs are you using? If you are using javascript drilldowns, you will need to reference parent and have the javascript code within the html file. Drilldowns still work, but you may need to adjust them to work in the context of the frame. Example:

 
TYPE=DATA,
     COLUMN=N2,
     JAVASCRIPT=parent.add( \
     ID \
     ),
$
ENDSTYLE
END
-HTMLFORM BEGIN
<html>
<body>
!IBI.FIL.RESULT_X;
</body>
</html>
-HTMLFORM END
 


WebFOCUS 7.7.03/8.0.08
Dev Studio 7.7.03/8.0.08
App Studio 8.0.08
Windows 7
ALL Outputs
 
Posts: 402 | Location: Upland, IN | Registered: June 08, 2012Report This Post
Guru
posted Hide Post
J
I'm just using the Webfocus drilldowns. Here's my drilldown code:

TYPE=DATA,
     COLUMN=N4,
     TARGET='_blank',
     DRILLMENUITEM='Printable Criminal History Report',
          FOCEXEC=app/criminalhistorylaunch( \
     THESPN=N3 \
     ),
     DRILLMENUITEM='Scanned Documents',
          URL=(ONBASE),
          TARGET='Document',
     DRILLMENUITEM='Mugshot History',
          FOCEXEC=app/mugshot_history_piclinkv2( \
     THESPN=N3 \
     ),
     DRILLMENUITEM='Jail Holds',
          FOCEXEC=app/jailhold_callv2( \
     THESPN=N3 \
     ),
$


Then, after I do the HOLD file, I have some HTML stuff that I was trying to put together. By using the browser debugger, I was able to see which IBI javascript files were necessary, so I added those in one at a time, but it's still not working. I'm convinced that I must be making this harder than it should be. Thanks again.

 -HTMLFORM BEGIN
<HTML>
<HEAD>
<!-- these are the scripts needed by jquery for theme application -->

<LINK rel=stylesheet href="https://code.jquery.com/ui/1.10.4/themes/pepper-grinder/jquery-ui.css" UserSuppliedFullPath="1">
<SCRIPT id=ITEM1 src="https://code.jquery.com/jquery-1.11.0.js" UserSuppliedFullPath="1"></SCRIPT>
<SCRIPT id=ITEM2 src="https://code.jquery.com/ui/1.10.4/jquery-ui.js" UserSuppliedFullPath="1"></SCRIPT>

<!-- these are the IBI scripts that I thought I had to add in manually -->

<script id="IBI_ibigbl" src="/ibi_html/javaassist/ibi/html/js/ibigbl.js"></script>
<script id="IBI_ibirls3" src="/ibi_html/javaassist/ibi/html/js/ibirls3.js"></script>
<script id="IBI_ibidropmenu" src="/ibi_html/javaassist/ibi/html/js/ibidropmenu.js"></script>
<script id="IBI_ibimultidrill" src="/ibi_html/javaassist/ibi/html/js/ibimultidrill.js"></script>
</HEAD>
<BODY class=ui-widget>

<SCRIPT>
$(function() {
$( "span" ).css( "z-index", "50");
$( ".x3" ).css( "border", "0" );
$( ".x4" ).css( "border", "0" );
$( ".x6" ).css( "border", "0" );
$( "TABLE" ).css( "border", "0" );
$( "TR" ).css( "border", "0" );
$( "TD" ).css( "border", "0" );
$( "table" ).css( "border", "0" );
$( "tr" ).css( "border", "0" );
$( "td" ).css( "border", "0" );
$( "table" ).addClass( "ui-widget-content" );
$( ".x1" ).css( "border", "0" );

 });
</SCRIPT>
<div class=ui-widget-content style="width:90%; border:0";>
!IBI.FIL.P3;
</div>
</BODY>
</HTML>
-HTMLFORM END


Webfocus 8
Windows, Linux
 
Posts: 258 | Location: Palm Coast, FL | Registered: February 05, 2010Report This Post
Guru
posted Hide Post
J
Looks like it's working! I changed it from HTMTABLE to format HTML, and that worked. Then I commented out my manually-added javascript lines, and it still worked! Thanks!

You - you're good, you.


Webfocus 8
Windows, Linux
 
Posts: 258 | Location: Palm Coast, FL | Registered: February 05, 2010Report This Post
Expert
posted Hide Post
With HOLD format HTMTABLE you do not get the JavaScript that is used for the multi-drilldown. You need to run the fex once with no HOLD statement, capture the generated HTML, then add the HOLD statement. This would result in the code below. In your example, you did not have the MDitems code, which is generated for each of the drill-down items.

-SET &ECHO=ALL;

TABLE FILE CAR
PRINT SALES
BY COUNTRY
BY MODEL
ON TABLE HOLD AS HOLD1 FORMAT HTMTABLE
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLESHEET *
TYPE=REPORT, GRID=OFF, FONT='VERDANA', SIZE=8, $
TYPE=TITLE, STYLE=BOLD, $
TYPE=DATA, COLUMN=COUNTRY,
DRILLMENUITEM='Drilldown 1',
JAVASCRIPT=RunReportDD('MULTIDRILL3DD1' 'R1' COUNTRY),
DRILLMENUITEM='Drilldown 2',
JAVASCRIPT=RunReportDD('MULTIDRILL3DD2' 'R2' COUNTRY),
$
ENDSTYLE
END
-RUN

-HTMLFORM BEGIN
<html>
<head>
<meta name="HandheldFriendly" content="True">
<meta name="PalmComputingPlatform" content="True">
<title>WebFOCUS Report</title>
<base href="http://localhost:8080/approot/App/">
<script language='javascript'>
var ibiOptions = new Array("multidrill");
var focexurl = "/ibi_apps/WFServlet?IBIF_webapp=/ibi_apps&IBIC_server=EDASERVE&IBIWF_msgviewer=OFF&IBIAPP_app=App%20Name&";
var fochtmlurl = "/ibi_html";
var serverLanguage='en';
</script>
<script language='javascript' src='/ibi_html/javaassist/nls.js'></script>
<script language='javascript' src='/ibi_html/javaassist/ibi/html/js/ibigbl.js'></script>
<script language='javascript'>
ibigblloadCss(null);
</script>
<SCRIPT LANGUAGE=JAVASCRIPT>var MDitems=new Array();var MDSingleEncode = true;MDitems[0]=new Object();MDitems[0].text="Drilldown 1";MDitems[0].url="javascript:RunReportDD";MDitems[0].target="";MDitems[1]=new Object();MDitems[1].text="Drilldown 2";MDitems[1].url="javascript:RunReportDD";MDitems[1].target="";</script></head>

<!-- My Javascript here -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.js"></script>

<body ONLOAD='ibigblOnLoad();'>

!IBI.FIL.HOLD1;

</body>
</html>
-HTMLFORM END


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Guru
posted Hide Post
Hi Francis,
That's exactly what I was doing - capturing the html and then stuffing it back in. That's when I realized that there must be a better way. I tried J's suggestion of using just HTML instead, and that did the trick.


Webfocus 8
Windows, Linux
 
Posts: 258 | Location: Palm Coast, FL | Registered: February 05, 2010Report This Post
Expert
posted Hide Post
The interesting thing about J's method, which I also use all over is that the html page has non standards-compliant HTML - it will have two tags... Luckily the browsers are forgiving.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Guru
posted Hide Post
NO kidding. I've worked on my application for the last 3 years to get it looking just the way I want, and I'm sure I'll have to start all over again.


Webfocus 8
Windows, Linux
 
Posts: 258 | Location: Palm Coast, FL | Registered: February 05, 2010Report This Post
Guru
posted Hide Post
quote:
With HOLD format HTMTABLE you do not get the JavaScript that is used for the multi-drilldown.



Is there a way to use this method on TYPE=HEADING?


WebFOCUS Administrator @ Worldpay FIS
PROD/DEV/TEST: 8204, SANDBOX: 8206 soon - BIP, Reportcaster, Resource Manager, EUM, HyperStage soon, DB: HIVE,Oracle,MSSQL
 
Posts: 291 | Location: Greater Cincinnati  | Registered: May 11, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Drilldowns and Jquery and HTMLFORM

Copyright © 1996-2020 Information Builders