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     [CASE OPENED] HTML Composer + MRE + JavaScript: problem in FF, Chrome, Safari, Opera

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CASE OPENED] HTML Composer + MRE + JavaScript: problem in FF, Chrome, Safari, Opera
 Login/Join
 
Expert
posted
I really would like to see HTML Composer become the go-to development tool for HTML pages in WebFOCUS, but too often I am perplexed by its behaviour. I realize I should open a case regarding this, but I'd like a sanity check first.

I would really appreciate someone reproducing the following test. I've found that a "Script" file "inserted" by the GUI "Insert Web Files" functionality does not get recognized when the MRE HTML page is run in Firefox, Chrome, Safari and Opera. It most likely is the same story for iOS Safari. When the Script file is added in this manner, the file is copied to the "Other" folder, and the HTML page script link points to the file there.

JavaScript file test_js1.js:

function alert1() {
alert('Hello from the MRE Domain "Other" folder');
}


Put this file in the baseapp application folder (or any other folder accessible by Dev Studio).

Open an MRE Domain in Dev Studio Explorer. Open the Standard Reports folder. Open one of the report "Group" folders. Create a new HTML file and create with Composer.

Click on the Insert toolbar link, select CSS/Links. Click on the New Script file icon and navigate to the location of file test_js1.js. Select the file and click on Open. Then click on OK.

Switch to the HTML tab in HTML Composer. After the "window_onload" function, add the following:

function onInitialUpdate() {
alert1();
}

This calls a function in the test_js1.js file.

Save the HTML file.

You can run the file from Dev Studio. It will open in IE and an alert window will open.

Now try running this from the MRE applet interface (URL: http://localhost:8080/ibi_apps...in/mr/mr_login.jsp?). Running it in IE results in an alert. Running it in Firefox, Chrome, Safari and Opera results in NO alert, no error message. I even downloaded Firefox v4.6 (the latest version that is certified to work with WF 7.7.03).

Of course, if you've come across this situation, you don't have to go through the pain of doing this test, please let me know if you've come across this problem.

Thanks very much.

This message has been edited. Last edited by: Francis Mariani,


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
I am getting the same behavior in 7.6.10. Appears to be a bug. Only way I could get it to work was to edit the script tag to use the javascript file from the application folder. Doesn't seem to recognize the javascript file in the "Other" folder.

<SCRIPT style="Z-INDEX: 0" id=ITEM1 type=text/javascript src="/approot/baseapp/test_js1.js"></SCRIPT>


WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
 
Posts: 320 | Location: Memphis, TN | Registered: February 12, 2008Report This Post
Expert
posted Hide Post
Thank you very much Mighty Max! Thanks for confirming I'm not going insane.

I do not understand why something as basic as this does not work. There must be people that use WebFOCUS for the internet where people use various browsers. WebFOCUS is certified to work with some of these browsers, but this flaw seems to have slipped by the certifiers. Yes, there's a workaround, but...

Cheers,


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
Gold member
posted Hide Post
Hi Francis

We have opened a Case for this issue and the is an known issue in WebFOCUS 77 with referencing the JavaScript and stylesheets in the HTML Composer. If you have hotfix 6 and the private fix for fshtmlpage.dll (that will be incluided in hotfix 7). Then insert the css files/JS files in the HTML Composer GUI and the references will begin to work as expected. If you cannot waite for hotfix 7 please open a case with techsupport and we will review the issue with you.

Thanks Barry


WebFOCUS 8103, Windows, App Studio
 
Posts: 80 | Location: NYC | Registered: November 13, 2008Report This Post
Expert
posted Hide Post
Barry,

Thank you very much for the good news and for all your fantastic assistance.

Cheers,


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

Would this also apply to javascript that I use to enable and disable a control and when using style.visibility on controls. It works great in IE but nothing happens in Firefox.


WebFOCUS Server 8.1.05
Windows 2008 Server
WebFOCUS AppStudio 8.1.05
Windows 7 Professional
IE 11 and Chrome Version 43.0.2357.124 m.
Mostly HTML, PDF, Excel, and AHTML
 
Posts: 272 | Location: Kalamazoo, Michigan | Registered: September 30, 2010Report This Post
Expert
posted Hide Post
I certainly hope you opened a case...


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
I haven't yet but will depending on Barry's response. Francis, I have been following your posts on the html issues you have been having and can relate. I love the composer tool, just find a lot of quirks with it.


WebFOCUS Server 8.1.05
Windows 2008 Server
WebFOCUS AppStudio 8.1.05
Windows 7 Professional
IE 11 and Chrome Version 43.0.2357.124 m.
Mostly HTML, PDF, Excel, and AHTML
 
Posts: 272 | Location: Kalamazoo, Michigan | Registered: September 30, 2010Report This Post
Gold member
posted Hide Post
Hi MAdams1

The issue that I commented on was about importing a javascript file in the HTML Composer. Was the JavaScript code in an external file or in the HTML Composer. Could you post the code for me to look at or just open a case and ask for Barry to be assigned the case. Since you are using 7703, try using the new API Functions that are available (it is in the new doc for HTML Composer).

IbComposer_showHtmlElement('elementID', bShow);

Thanks Barry


WebFOCUS 8103, Windows, App Studio
 
Posts: 80 | Location: NYC | Registered: November 13, 2008Report This Post
Gold member
posted Hide Post
Hi MAdams1

I can appreciate your fustration. When you have issues, please feel free to open a Case and ask for me to be assigned to the case.

Thanks Barry


WebFOCUS 8103, Windows, App Studio
 
Posts: 80 | Location: NYC | Registered: November 13, 2008Report This Post
Guru
posted Hide Post
This is what I've been using to enable and disable controls and show and hide them. I will try to find the API Funtion docs you refer to. Is there a don't show function?


function onInitialUpdate(){
var selCompleted = document.getElementById('ReportCombobox_0');
var selNotCompleted = document.getElementById('ReportCombobox_1');
var selSummary = document.getElementById('ReportCombobox_2');
var selSuper = document.getElementById('ReportCombobox_3');
var selHistory = document.getElementById('ReportCombobox_4');
var selSchedule = document.getElementById('ReportCombobox_5');
var selOptions = document.getElementById('SummaryRadioButton');
var selEvent = document.getElementById('EventTitleCombobox');
var selStaff = document.getElementById('StaffCombobox');
var selFromDate = document.getElementById('FromDateCalendar');
var selToDate = document.getElementById('ToDateCalendar');
var selSort = document.getElementById('SortByRadioButton');
var selSortSuper = document.getElementById('SortBySupervisorRadio');
 
//var images=document.getElementsByTagName("img");
 
//lables
var lblOptions = document.getElementById('OptionsLabel');
var lblEvent = document.getElementById('EventTitleLabel');
var lblStaff = document.getElementById('StaffLabel');
var lblFromDate = document.getElementById('FromDateLabel');
var lblToDate = document.getElementById('ToDateLabel');
var lblSort = document.getElementById('SortLabel');
 
 
selOptions.disabled = true;
selSortSuper.style.visibility = "hidden";
selSort.style.visibility = "visible";
selSort.disabled = true;
selEvent.disabled = true;
selStaff.disabled = true;
selFromDate.disabled = true;
 
 
 
//lables
lblOptions.disabled = true;
lblEvent.disabled = true;
lblStaff.disabled = true;
lblFromDate.disabled = true;
lblToDate.disabled = true;
lblSort.disabled = true; 
 
}
//End function onInitialUpdate  


WebFOCUS Server 8.1.05
Windows 2008 Server
WebFOCUS AppStudio 8.1.05
Windows 7 Professional
IE 11 and Chrome Version 43.0.2357.124 m.
Mostly HTML, PDF, Excel, and AHTML
 
Posts: 272 | Location: Kalamazoo, Michigan | Registered: September 30, 2010Report This Post
Guru
posted Hide Post
quote:
Originally posted by BarryS:
IbComposer_showHtmlElement('elementID', bShow);


Okay Barry, I get the bShow boolean now that I read the doc. I will give this a try.
So does this mean that plain old javascript will not work with WF in all browsers, we have to use the IbComposer code?

Thanks
Michelle


WebFOCUS Server 8.1.05
Windows 2008 Server
WebFOCUS AppStudio 8.1.05
Windows 7 Professional
IE 11 and Chrome Version 43.0.2357.124 m.
Mostly HTML, PDF, Excel, and AHTML
 
Posts: 272 | Location: Kalamazoo, Michigan | Registered: September 30, 2010Report This Post
Guru
posted Hide Post
Barry, I will be opening a case on this and requesting you. I replaced my JS code with the below WF JS. Much less code but doesn't quite work the same. I have discovered that
 IbComposer_enableHtmlElement 
will not disable a label. Works great for comboboxes and radio buttons just not labels. However
IbComposer_showHtmlElement
works with labels.

Michelle

 
//Begin function onInitialUpdate()
function onInitialUpdate(){
//form1Reset_onclick();
 
//var images=document.getElementsByTagName("img");

IbComposer_enableHtmlElement('SummaryRadioButton', false);
IbComposer_enableHtmlElement('SortByRadioButton', false);
IbComposer_enableHtmlElement('EventTitleCombobox', false);
IbComposer_enableHtmlElement('StaffCombobox', false);
IbComposer_enableHtmlElement('FromDateCalendar', false);
IbComposer_enableHtmlElement('ToDateCalendar', false);

IbComposer_showHtmlElement('SortBySupervisorRadio', false);
IbComposer_showHtmlElement('SortByRadioButton', true);

//lables
IbComposer_enableHtmlElement('OptionsLabel', false);
IbComposer_enableHtmlElement('EventTitleLabel', false);
IbComposer_enableHtmlElement('StaffLabel', false);
IbComposer_enableHtmlElement('FromDateLabel', false);
IbComposer_enableHtmlElement('ToDateLabel', false);
IbComposer_enableHtmlElement('SortLabel', false);
 
}
//End function onInitialUpdate
 


WebFOCUS Server 8.1.05
Windows 2008 Server
WebFOCUS AppStudio 8.1.05
Windows 7 Professional
IE 11 and Chrome Version 43.0.2357.124 m.
Mostly HTML, PDF, Excel, and AHTML
 
Posts: 272 | Location: Kalamazoo, Michigan | Registered: September 30, 2010Report 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     [CASE OPENED] HTML Composer + MRE + JavaScript: problem in FF, Chrome, Safari, Opera

Copyright © 1996-2020 Information Builders