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 / SHARING] Composer / JavaScript question

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED / SHARING] Composer / JavaScript question
 Login/Join
 
Expert
posted
This may be concidered "Esoteric Minutiae" (I like that phrase). However, someone has asked a question about this and I don't see how to do it. So, here's one for all the Focal Pointers out there:

Is it possible to tell if you are in the component editor (AKA: HTM Composer) or actually running. I have a one-line javascript that puts a running clock on my launch page (a nice to have feature for your tool box)... It's active even in the composer. Weird. It creates a distracting flicker and interferes with updating properties. Is there a way to disable or bypass it while in the composer? Neither "visibility=hidden" or "disabled=true work".

BTW: Here's the code
<!-- Generated by Report Layout Painter -->
<!-- EsotericMinutiae.htm: Douglas Lee, c/o: Chris Johnson -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META id=mycharsetmeta content="text/html; charset=UTF-8" http-equiv=Content-Type>
<META id=Generation content="Gen 3.0">
<SCRIPT id=IBI_RelCallBack type=text/javascript>function AdjustChildrenPosition(){
}
</SCRIPT>

<SCRIPT id=IBI_OptionsScript type=text/javascript>
var cgipath = "cgipath";
var ibirls = "ibirls3";

var rltdyncalendar = "rltdyncalendar";
var gmap = "ibigmap";
var olap="olap";
var olappanebase="olappanebase";
var olapdrill="olapdrill";

var ibixmltree="ibixmltree";

var ibiOptions = new Array(cgipath,ibirls);
</SCRIPT>

<SCRIPT id=IBI_nls type=text/javascript src="/ibi_html/javaassist/nls.js"></SCRIPT>

<SCRIPT id=IBI_nlsVars type=text/javascript src="/ibi_html/javaassist/nlsvars.js"></SCRIPT>

<SCRIPT id=IBI_ibigbl type=text/javascript src="/ibi_html/javaassist/ibi/html/js/ibigbl.js"></SCRIPT>

<SCRIPT id=IBI_ibigblloadCss type=text/javascript>
ibigblloadCss(null);
addIntlTranslatedJS("composertrans.js");
</SCRIPT>
<TITLE></TITLE>
<SCRIPT id=clientEventHandlersJS type=text/javascript>
//Begin function window_onload
function window_onload() {
	// set a timer to fire every second to update the time display
	setInterval(function(){document.getElementById("tod_text").firstChild.nodeValue = new Date();}, 1000);  

	UpdateData();
}
//End function window_onload


</SCRIPT>

<SCRIPT for=window type=text/javascript eventname="onload">window.onload = function() { window_onload(); }</SCRIPT>

<META name=GENERATOR content="MSHTML 8.00.6001.19258"></HEAD>
<BODY style="Z-INDEX: 0; BACKGROUND-COLOR: #99ffff; OVERFLOW: auto" bgColor=#ffffff elementtype="21" edaconnectionrequired="false" nextelementuniquenumber="58">                   
<SPAN style="Z-INDEX: 33; POSITION: absolute; BACKGROUND-COLOR: black; WIDTH: 1080px; HEIGHT: 9px; FONT-SIZE: 1pt; TOP: 70px; LEFT: 20px" id=line2 tabIndex=0 elementtype="5"></SPAN>          
<SPAN style="Z-INDEX: 0; POSITION: absolute; TEXT-ALIGN: right; WIDTH: 230px; FONT-FAMILY: Calibri; HEIGHT: 20px; FONT-SIZE: 10pt; TOP: 30px; FONT-WEIGHT: bold; LEFT: 870px" id=tod_text tabIndex=32>Fri Aug 24 10:29:43 CDT 2012</SPAN> 
<SPAN style="Z-INDEX: 38; POSITION: absolute; TEXT-ALIGN: right; WIDTH: 230px; FONT-FAMILY: Calibri; HEIGHT: 20px; FONT-SIZE: 10pt; TOP: 50px; FONT-WEIGHT: bold; LEFT: 870px" id=MRUser language=javascript tabIndex=33>Logged on as: !IBI.AMP.IBIMR_user;</SPAN>                    
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=layoutinfo type=hidden>
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=IBIMR_domain value=yardmana/yardmana.htm type=hidden name="IBIMR_domain">
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=IBIMR_folder value=#reportsry1rf type=hidden name="IBIMR_folder">
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=ibif_ex value=app/launchpage1.htm type=hidden name="ibif_ex">
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=ibiapp_app value=yardmanagementsystem type=hidden ismre="1" name="ibiapp_app">
<xml id=focus_xmlelement>
<script type="text/xml">
	
<rootxmlnode top="20" left="1119" width="150" height="130">
		
<variables>
		</variables>
		
<input_controls>
		</input_controls>
		
<other_bound_objects></other_bound_objects>
		
<requests></requests></rootxmlnode></script>
</xml></BODY>
<SCRIPT id=IBI_loader type=text/javascript>
doBeforeLoad();
</SCRIPT>
</HTML>

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




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Expert
posted Hide Post
You might be able to test the location variable value. I think when an html document is opened in HTML Composer, the JS location variable will contain "blank.html".


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
I'm not familiar with "JS location variable". Is it a "document.item.value" or something?
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Expert
posted Hide Post
DevGuru: JavaScript > OBJECT: Location

I would add an if statement in your function to test the existence of "blank.htm":

function window_onload() {
if (location.indexof("blank.htm") =-1) { 
	// set a timer to fire every second to update the time display
	setInterval(function(){document.getElementById("tod_text").firstChild.nodeValue = new Date();}, 1000);  

	UpdateData();
}
}


This is untested code.


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
This is a case of Focal Point working as designed: Great minds thinking alike.

1) Thanks Francis, for pointing us in the right direction and for your solution which is very similar to the solution which Chris (the person who asked the original question) came up with.

2) Thanks Chris for your solution, as follows:
                // set a timer to fire every second to update the time display, but only display a placeholder in composer
                if (location.href.indexOf("WFServlet") > -1) {
                                document.getElementById("tod_text").firstChild.nodeValue = new Date();
                                setInterval(function(){document.getElementById("tod_text").firstChild.nodeValue = new Date();}, 1000);  
                } else {
                                document.getElementById("tod_text").firstChild.nodeValue = new Date();
                }              

 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Virtuoso
posted Hide Post
No need to repeat that initialisation:
// set a timer to fire every second to update the time display, but only display a placeholder in composer
document.getElementById("tod_text").firstChild.nodeValue = new Date();
if (location.href.indexOf("WFServlet") > -1) {
	setInterval(function(){document.getElementById("tod_text").firstChild.nodeValue = new Date();}, 1000);
}


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
  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 / SHARING] Composer / JavaScript question

Copyright © 1996-2020 Information Builders