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] Hide listbox on html page on load

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Hide listbox on html page on load
 Login/Join
 
Member
posted
Hello, I am trying to hide by default a listbox that is populated with the CAR file. Althought the code was working in 765, we have upgraded to 769, seems the listbox always appear on load now. The radio button seems to be able to hide the listbox and show the listbox properly.

Here's an example of my code using the CAR file.

  
<HTML>
<HEAD>
<META id=mycharsetmeta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
<META id=Generation content="Gen 3.0">
<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>
<TITLE>HtmlPage</TITLE>
<SCRIPT id=IBI_RelCallBack type=text/javascript>function AdjustChildrenPosition(){
}
</SCRIPT>

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

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

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

<SCRIPT id=IBI_ibigblloadCss type=text/javascript>
ibigblloadCss(null);
</SCRIPT>

<SCRIPT id=clientEventHandlersJS type=text/javascript>
//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
function OnInitialUpdate(){
 document.getElementsById("CARLIST").style.visibility='hidden';
}
 
//Begin function RADIO_onclick
function RADIO_onclick(ctrl) {
    if(RADIO_0.checked==true) {
    document.getElementById("CARLIST").style.visibility='visible';
 }
 
    if(RADIO_1.checked==true) {
    document.getElementById("CARLIST").style.visibility='hidden';
 }
}
//End function RADIO_onclick
</SCRIPT>

<SCRIPT for=window eventname="onload">window.onload = function() { window_onload(); }</SCRIPT>
</HEAD>
<BODY style="OVERFLOW: auto" edaconnectionrequired="true" nextelementuniquenumber="20">
<SELECT id=CARLIST style="Z-INDEX: 1; LEFT: 278px; VISIBILITY: hidden; WIDTH: 204px; POSITION: absolute; TOP: 165px; HEIGHT: 340px" tabIndex=1 size=3 name=CARLIST persistentuniqueid="compUid_1"></SELECT> 
<SPAN language=javascript id=RADIO title=RADIO contentEditable=false style="Z-INDEX: 2; LEFT: 332px; WIDTH: 82px; POSITION: absolute; TOP: 74px; HEIGHT: 69px" onclick=RADIO_onclick(this) tabIndex=2 persistentuniqueid="compUid_4" name="radio1" elementtype="12" columns="1" groupChildren="1">
<TABLE contentEditable=false style="WIDTH: 100%; HEIGHT: 100%" cellSpacing=0 cellPadding=0>
<TBODY>
<TR>
<TD>
<INPUT id=RADIO_0 tabIndex=2 type=radio value=Show name=radio1 displaytext="Show"> 
<LABEL id=radio1_LABEL_0 style="CURSOR: default" for=radio1_0>Show</LABEL></TD></TR>
<TR>
<TD>
<INPUT id=RADIO_1 tabIndex=2 type=radio CHECKED value=Hide name=radio1 displaytext="Hide"> 
<LABEL id=radio1_LABEL_1 style="CURSOR: default" for=radio1_1>Hide</LABEL></TD></TR></TBODY></TABLE></SPAN>
<INPUT id=layoutinfo style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden persistentuniqueid="compUid_19"> 
<INPUT id=ibiapp_app style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden value=mememe name=ibiapp_app persistentuniqueid="compUid_20" name="ibiapp_app"> 
<xml id=focus_xmlelement>
<script>
	
<rootxmlnode top="20" left="719" width="150" height="130">
		
<variables></variables>
		
<input_controls>
			
<input_control bindcontrolid="compUid_1" inbinding="1" top="165" left="278" width="60" height="20" elementtype="9" name="CARLIST" id="CARLIST" multiple="0" unresolved="0" onetimepopulated="0">
				
<link linktype="default">
					
<condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0">
						
<data_info datatype="1" sourcetype="typeMaster" datasource="CAR.mas" displayfield="CAR.CARREC.MODEL" datafield="CAR.CARREC.MODEL" ibiapp_app="mememe" ibic_server="EDASERVE" addalloption="1" dynalldisplayvalue="ALL" sortorder="0" selectedvalue="FOC_NONE" ibiformat="A24" dfformat="A24" modifiedrequest="0">
							
<![CDATA[TABLE FILE CAR
SUM FST.CAR.CARREC.MODEL
 BY CAR.CARREC.MODEL
-*insert_filters_here
ON TABLE PCHOLD FORMAT XML
END
]]></data_info></condition></link></input_control>
			
<input_control bindcontrolid="compUid_4" inbinding="1" top="40" left="273" width="60" height="20" elementtype="12" name="radio1" id="RADIO" multiple="0" textvarname="_TEXT" onetimepopulated="1">
				
<link linktype="default">
					
<condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0">
						
<data_info modifiedrequest="1">
							
<static_values>
								
<static value="Show" display="Show" selected="0"></static>
								
<static value="Hide" display="Hide" selected="1"></static></static_values></data_info></condition></link></input_control>
			
<input_control bindcontrolid="compUid_19" inbinding="1" top="0" left="0" width="60" height="20" elementtype="26" name="layoutinfo" id="layoutinfo" multiple="0" onetimepopulated="1">
<link linktype="default">
<condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0">
<data_info accept="0">
<static_values>
<static value="" display="" selected="0"></static></static_values></data_info></condition></link></input_control>
<input_control bindcontrolid="compUid_20" inbinding="1" top="0" left="0" width="60" height="20" elementtype="26" name="ibiapp_app" id="ibiapp_app" multiple="0" onetimepopulated="1">
<link linktype="default">
<condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0">
<data_info accept="0">
<static_values>
<static value="mememe" display="" selected="0"></static></static_values></data_info></condition></link></input_control></input_controls>
		
<other_bound_objects></other_bound_objects>
		
<requests></requests></rootxmlnode></script>
</xml></BODY>
<SCRIPT id=IBI_loader type=text/javascript>
doBeforeLoad();
</SCRIPT>
</HTML>


You can see that by default, the visibility of the listbox is set to hidden and also in the JS, we have put a command to hide the listbox. What is in 769 that changed since 765?

Thanks,

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


WebFOCUS 769
Windows 2003 SP2
Tomcat app server
Excel, HTML, PDF
 
Posts: 17 | Location: Montreal | Registered: March 05, 2009Report This Post
Gold member
posted Hide Post
OnInitialUpdate() is not firing because it is spelled wrong, it should be onInitialUpdate(). The 'O' is lowercase.


WF 8.2.01M
8.2.01M Reporting Server
Windows 2012 Srvr R2
PDF,Excel, HTML
Graphs - a lot of graphs
 
Posts: 60 | Location: Atlanta, GA | Registered: October 30, 2003Report This Post
Member
posted Hide Post
Thanks but even with the onInitialUpdate() spelled with the 'O' in lowercase, it doesn't change anything.


WebFOCUS 769
Windows 2003 SP2
Tomcat app server
Excel, HTML, PDF
 
Posts: 17 | Location: Montreal | Registered: March 05, 2009Report This Post
Expert
posted Hide Post
Works perfectly fine for me.

767 DS
769 RS


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Member
posted Hide Post
Thanks guys, I've found the problem. It was due to the 'O' that had to be lowercase but also, the following line:

document.getElementsById("CARLIST").style.visibility='hidden';

should be:

document.getElementById("CARLIST").style.visibility='hidden';

There is not 's' in getElementById. Double typo error.

Why is it always when you ask for help that you start to really see the problem?

I feel so ridiculous... thank you so much.


WebFOCUS 769
Windows 2003 SP2
Tomcat app server
Excel, HTML, PDF
 
Posts: 17 | Location: Montreal | Registered: March 05, 2009Report This Post
Expert
posted Hide Post
S7,

Don't feel ridiculous! You just helped me with a process where I wanted to do the same thing. I had already removed the "s" in
  
document.getElementsById("CARLIST").style.visibility='hidden';

AND, I forgot to mention that...

I was playing around with the ibirls3 to 2 to blank...

THANKS!!!

Good One


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Expert
posted Hide Post
Nice Thread
Thanks... I needed this a while ago and abandoned it... So, thanks for bringing it up...
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 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] Hide listbox on html page on load

Copyright © 1996-2020 Information Builders