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     [CLOSED] Does anybody have a work around for including javascript in html composer?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Does anybody have a work around for including javascript in html composer?
 Login/Join
 
Silver Member
posted
I have searched this site and the documentation, but have not found any resolution for this. I have opened a ticket, but I was wondering if anybody else is having this same issue and has found a way around it.

We are converting to version 8.0.0.8. All of our launch pages include a utility javascript file that we have created. In version 7, we could include the file and then prior to moving the launch page into production we would edit the html to point to the correct directory. That worked fine. However, in version 8 if you dare to edit the html directly you get the dreaded "This file has been manually edited." every time you try and open it in the composer from then on. In addition, if you try importing the javascript file through the html composer it adds the javascript file into the content (domain) other folder and then into the repository. If you have multiple domains it would create the same file in each domain. That would be a nightmare to maintain. We tried putting the file in the apps/common directory, but it still pulled the file into the individual domain. There has to be a better way of doing this.

Maybe IBI needs to create a new path variable in the setup for javascript files? One that wouldn't get overwritten or moved when you pull the file into the composer. Or maybe we can edit one of the existing files like ibirls3.js to include a call for additional javascript files. There are more and more javascript files cropping up every day. I don't think IBI has the time to devote to recreating the functionality of all of these files into their own proprietary files. It would seem to be an advantage to them to create a way to easily incorporate these without causing the developer to jump through a lot of hoops or frustration of receiving these constant "modified file" warnings. If you ask us to NOT edit the html, then at least give us a way of doing what we need to do without modifying the html.

Thank you,
Kris

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


8.0.0.8
Linux/windows
 
Posts: 36 | Registered: October 24, 2012Report This Post
Expert
posted Hide Post
I don't think that a "work-around" is needed... The hooks are in App Studio for JS...
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Guru
posted Hide Post
If the file is web accessible, you go to the Insert -> CSS/Scripts dialog, select to add a script and in the open file dialog, you enter the fully-qualified HTTP reference to the file.


David Glick
Director WebFOCUS App Studio
and WebFOCUS Developer Studio
WebFOCUS Division
Information Builders, Inc.
Direct (917) 339-5560
Voice Mail (212) 736-6250 x3560
Fax (212) 947-5168
Email david_glick@ibi.com
 
Posts: 315 | Registered: April 13, 2004Report This Post
Silver Member
posted Hide Post
Thank you for your replies.

Doug - We aren't using App Studio as yet. We are still using Dev Studio. If we remediate these in App Studio can they still be opened and edited in Dev Studio? We are trying to decide which tool we should be using and how we want to work going forward.

David - If I use a fully qualified http reference, does that eliminate the problem of the file being pulled into the the same domain (content) folder that the launch page is in?

Thanks again for all your expertise it is greatly appreciated.


8.0.0.8
Linux/windows
 
Posts: 36 | Registered: October 24, 2012Report This Post
Guru
posted Hide Post
Kris,

Use of an http call does not copy the file any where. Also, once you use App Studio, you cannot open the page in Developer Studio. Developer Studio will be functionally stabilized soon so moving to App Studio would be the way to work moving forward.


David Glick
Director WebFOCUS App Studio
and WebFOCUS Developer Studio
WebFOCUS Division
Information Builders, Inc.
Direct (917) 339-5560
Voice Mail (212) 736-6250 x3560
Fax (212) 947-5168
Email david_glick@ibi.com
 
Posts: 315 | Registered: April 13, 2004Report This Post
Expert
posted Hide Post
quote:
Use of an http call does not copy the file any where

Very unfortunately, this is a completely wrong statement.

In Developer Studio 8.0.08:

In the Public Content folder I added a new HTML file. With THE GUI, I added one CSS file and one JS file - both are in the Web Applications area of the WebFOCUS Environment. I then saved the file. Returning to the Explorer Tree I refreshed the Public folder, and unsurprisingly, the CSS and JS files were added to the Public folder in the Content section. This will happen for every folder that you create an HTML file in with references to CSS and JS libraries.

The HTML code (heaven forbid that I look at HTML code) shows the reference to be the dreaded rtFileName in the Content area (Repository):

<LINK id=ITEM3 rel=stylesheet type=text/css rtFileName="/WFC/Repository/Public/cppib-sty.css">
<SCRIPT id=ITEM4 type=text/javascript rtFileName="/WFC/Repository/Public/cppib-util.js"></SCRIPT>

Some people fear what App Studio will do to their existing Dev Studio HTML pages (makes a mess, I tested it) so the safe route is to continue to use Dev Studio. But then Dev Studio has its own problems.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD>
<META id=RLT_STANDARDS_MODE_META content=IE=9 http-equiv=X-UA-Compatible>
<META name=mycharsetmeta content="text/html; charset=ISO-8859-1" http-equiv=Content-Type>
<META name=Generation content="Created in release 8008, Generation 3">
<SCRIPT type=text/javascript>//confidential_id=IBI_OptionsScript
var szHtmlAlias="/ibi_apps/ibi_html";var szRunTimeHtmlAlias="runTimeHtmlAlias";var cgipath="cgipath";var ibirls="ibirls3";var rltdyncalendar="rltdyncalendar";var map="ibimap";var olap="olap";var olappanebase="olappanebase";var olapdrill="olapdrill";var ibiOptions = new Array(cgipath,ibirls);var nlsScript="/javaassist/nls.js";var nlsVarsScript="/javaassist/nlsvars.js";var glbScript="/javaassist/ibi/html/js/ibigbl.js";var replacePart="<replace>";
var scriptTemplate='<SCRIPT src="'+replacePart+'" type="text/javascript"><\/SCRIPT>';if(typeof(szRunTimeHtmlAlias) === 'string' && szRunTimeHtmlAlias.indexOf('/') == 0)szHtmlAlias=szRunTimeHtmlAlias;document.write(scriptTemplate.replace(replacePart, szHtmlAlias + nlsScript));document.write(scriptTemplate.replace(replacePart, szHtmlAlias + nlsVarsScript));document.write(scriptTemplate.replace(replacePart, szHtmlAlias + glbScript));</SCRIPT>

<SCRIPT type=text/javascript>//confidential_id=IBI_ibigblloadCss
if(typeof ibigblloadCss === 'function'){ibigblloadCss(null);addIntlTranslatedJS("composertrans.js");}else {alert("JavaScript alias '/ibi_apps/ibi_html'  is not valid");window.location("about:blank");}</SCRIPT>
<TITLE>HtmlPage</TITLE>
<SCRIPT for=window type=text/javascript eventname="onload">window.onload = function() { window_onload(); }</SCRIPT>

<SCRIPT>//confidential_id=clientEventHandlersJS


//Begin function window_onload
function window_onload() {
 
UpdateData();
 
// TODO: Add your event handler code here
//add onInitialUpdate() function to make changes before initial run of the reports
}
//End function window_onload
</SCRIPT>
<LINK id=ITEM2 rel=stylesheet type=text/css rtFileName="cgipathsub/ibi_html/javaassist/ibi/html/composer/themes/nonBindows/IBI-Themes/default_theme.css"><LINK id=IBI_THEME_CSS rel=stylesheet type=text/css desc="Information Builders" rtFileName="cgipathsub/ibi_html/javaassist/ibi/html/composer/themes/nonBindows/IBI-Themes/ibi.css"><LINK id=ITEM3 rel=stylesheet type=text/css rtFileName="/WFC/Repository/Public/cppib-sty.css">
<SCRIPT id=ITEM4 type=text/javascript rtFileName="/WFC/Repository/Public/cppib-util.js"></SCRIPT>
</HEAD>
<BODY style="OVERFLOW: auto" class=IBI_PageBg maptype="0" thumbnailscale="4" elementtype="21" edaconnectionrequired="false"><INPUT style="Z-INDEX: 1; POSITION: absolute; WIDTH: 230px; HEIGHT: 170px; TOP: 70px; LEFT: 570px" id=button1 class="IBIfield IBI_button" tabIndex=1 value=Boom! type=button name="button1"><INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=layoutinfo type=hidden resourcectrlids="ITEM2;IBI_THEME_CSS" name="inputhidden1"><INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=ibiapp_app type=hidden ismre="1" name="ibiapp_app"><INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=ibif_ex value=/WFC/Repository/Public/fm_test_1.htm type=hidden name="ibif_ex"><xml id=focus_xmlelement><script type="text/xml"><rootxmlnode focoption="_FOC_NULL"><variables></variables><input_controls></input_controls><requests></requests><other_bound_objects></other_bound_objects></rootxmlnode></script>
</xml></BODY>
<SCRIPT type=text/javascript>//confidential_id=IBI_loader
if(typeof doBeforeLoad === 'function'){doBeforeLoad();}function AdjustChildrenPosition(){
}
</SCRIPT>
</HTML>
<!-- cc y*** -->


By the way, what on earth is
"<!-- cc y*** -->"
?


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
Expert
posted Hide Post
In App Studio 8.0.08:

I created a new folder "Francis Mariani" in the Contents area. I used the GUI to create a new HTML page. Using the Settings area, I added a CSS file and a JS file - both are in the Web Applications area of the Environment.

I added text and applied a style from my stylesheet. In the GUI editor the text is correctly styled. The JS file contains one line - a JS comment.

I save the file and run it. I get a JavaScript error AND the style is not applied.

These are the facts: I have problems with App Studio 8.0.08 and with Dev Studio 8.0.08.



<html_element rtFileName="/approot/web/themes/cppib-theme/cppib-sty.css" type="cssfile"/>
<html_element rtFileName="/approot/test/dummy1.js" type="script"/>




<!DOCTYPE html>
<HTML><HEAD>
<META content=IE=Edge http-equiv=X-UA-Compatible>
<META name=mycharsetmeta content="text/html; charset=ISO-8859-1" http-equiv=Content-Type>
<META name=Generation content="Created in release 8008, Generation 4">
<META name=viewport content="width=device-width, initial-scale=1.0, maximum-scale=1.0"><script type="text/javascript">
//confidential_id=IBI_OptionsScript
var szHtmlAlias="/ibi_apps/ibi_html";var is_mobile="false";var szRunTimeHtmlAlias="runTimeHtmlAlias";var cgipath="cgipath";var ib_composer="ib_composer";var map="ib_composer_map";var grid="ib_composer_grid";var ibiOptions = new Array(cgipath,ib_composer);var nlsScript="/javaassist/nls.js";var glbScript="/javaassist/ibi/html/js/ibigbl.js";var replacePart="<replace>";
var scriptTemplate='<script src="'+replacePart+'" type="text/javascript"><\/script>';if(typeof(szRunTimeHtmlAlias) === 'string' && szRunTimeHtmlAlias.indexOf('/') == 0)szHtmlAlias=szRunTimeHtmlAlias;document.write(scriptTemplate.replace(replacePart, szHtmlAlias + nlsScript));document.write(scriptTemplate.replace(replacePart, szHtmlAlias + glbScript));</script><script type="text/javascript">
//confidential_id=IBI_ibigblloadCss
if(typeof ibigblloadCss === 'function'){ibigblloadCss(null);addIntlTranslatedJS("composertrans.js");}else {alert("JavaScript alias '/ibi_apps/ibi_html'  is not valid.");window.location("about:blank");}</script><TITLE>HtmlPage</TITLE>
<SCRIPT type=text/javascript>
//confidential_id=clientEventHandlersJS

//Begin function window_onload
function window_onload() {


UpdateData();

// TODO: Add your event handler code here
//add onInitialUpdate() function to make changes before initial run of the reports
}
//End function window_onload
</SCRIPT>

<STYLE></STYLE>
<!--//confidential_id=focus_xmlelement
<rootxmlnode focoption="_FOC_NULL"><html_elements><html_body thumbnailscale="4" use_appl_css="no" maptype="0" autofitchildren="no" mobiledocument="no" edaconnectionrequired="false" ibiapp_app="Francis_Mariani" ismre="1" ibif_ex="/WFC/Repository/Francis_Mariani/HtmlPage1.htm"><html_event eventname="load" eventhandlername="window_onload"/></html_body><html_element bindcontrolid="button1" myviewonautofit="dontyouever"/><html_element bindcontrolid="text1" myviewonautofit="dontyouever" elementtype="4"/><html_element rtFileName="cgipathsub/ibi_html/javaassist/ibi/html/composer/themes/nonBindows/IBI-Themes/default_theme.css" type="cssfile"/><html_element rtFileName="cgipathsub/ibi_html/javaassist/ibi/html/composer/themes/nonBindows/IBI-Themes/ibi.css" bindcontrolid="IBI_THEME_CSS" desc="Information Builders" type="cssfile"/><html_element rtFileName="/approot/web/themes/cppib-theme/cppib-sty.css" type="cssfile"/><html_element rtFileName="/approot/test/dummy1.js" type="script"/></html_elements><variables></variables><input_controls></input_controls><requests></requests><other_bound_objects></other_bound_objects><tasks><task id="load" trigger="load"/></tasks><animations></animations></rootxmlnode>
--><script type="text/javascript">
//confidential_id=updateHeadElements
if(typeof updateHeadElements === 'function'){updateHeadElements();}</script></HEAD>
<BODY class=IBI_PageBg><INPUT style="Z-INDEX: 1; POSITION: absolute; WIDTH: 100px; HEIGHT: 120px; TOP: 350px; LEFT: 110px" id=button1 class=IBI_button tabIndex=1 value=Boom! type=button name="button1"> <SPAN style="Z-INDEX: 2; POSITION: absolute; WIDTH: 240px; HEIGHT: 110px; TOP: 60px; LEFT: 50px" id=text1 class=er-head_Portal>TEST TEST TEST</SPAN> </BODY><script type="text/javascript">
//confidential_id=IBI_loader
if(typeof doBeforeLoad === 'function'){doBeforeLoad();}function AdjustChildrenPosition(){
}
</script></HTML>
<!-- cc ykps -->


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
Kris,

Please listen to what I stated. Francis is NOT doing what I stated. If you enter a fully qualified http reference for your CSS and JS files, in the Open file dialog, they will not be copied any where.


David Glick
Director WebFOCUS App Studio
and WebFOCUS Developer Studio
WebFOCUS Division
Information Builders, Inc.
Direct (917) 339-5560
Voice Mail (212) 736-6250 x3560
Fax (212) 947-5168
Email david_glick@ibi.com
 
Posts: 315 | Registered: April 13, 2004Report This Post
Virtuoso
posted Hide Post
With a "fully qualified http reference" you mean an URL that includes the protocol and hostname parts, I presume?

If so, that would be a major inconvenience for those of us who have test and production servers (and perhaps even an acceptance server in between) with different versions of those CSS and JS files.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Expert
posted Hide Post
A major inconvenience and completely wrong for the real world. We have DEV, QA, UAT and PROD environments, so a FULLY QUALIFIED URL IS NO GOOD. It appears that using a FULLY QUALIFIED URL is one way to disguise that there is a bug with the point-and-click file selection of the GUI tool.


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
Silver Member
posted Hide Post
Thank you Wep5622 and Francis. I am so glad that you both responded to this thread. I was trying to figure out how to get around that fully qualified url with multiple environments. I could edit the html, but then I'm back to the "this file has been manually edited." There has to be a better way of doing this. Has anyone seen another thread on this where there has been a case opened with IBI. I would definitely go vote on it.

Thanks again.


8.0.0.8
Linux/windows
 
Posts: 36 | Registered: October 24, 2012Report This Post
Expert
posted Hide Post
I opened case 12103522 - "AppStudio add js file not working". It's currently in 'SUSPENDED' status because
quote:
According to the Division it failed still in 8008 (not all the time) but it is fixed now in 8009.
However this release is not yet available but within the next 3 months.

So, good luck to us.


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
Expert
posted Hide Post
Francis,

I have managed to circumvent the "fully qualified" requirement by inferring it using "../ibi_apps/ etc.".

Does this work for you?

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
Does this work for me? No one has yet made your suggestion, not even David Glick.

I will give it a try one day when I'm confident that the GUI helps my productivity.

Thanks very much for your suggestion, but why doesn't the point-and-click method work? Isn't that the new paradigm that we're all forced into using? Why does no one admit there's a bug?


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
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Does anybody have a work around for including javascript in html composer?

Copyright © 1996-2020 Information Builders