Focal Point
[CLOSED] Uncheck , check box and multi select tree control.

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5387041826

January 22, 2013, 03:40 PM
Neenz
[CLOSED] Uncheck , check box and multi select tree control.
I have a checkbox and a tree control with multiple selection. Once it comes up I need the check box and tree control to be unchecked . I am using javascript on page load to uncheck it, but still it is getting checked. Can the javascript experts out here help me. Please find my code below.


 <HTML>
<HEAD>
<META id=mycharsetmeta content="text/html; charset=ISO-8859-1" http-equiv=Content-Type>
<META id=Generation content="Created in release 7703, Generation 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>

<SCRIPT id=clientEventHandlersJS type=text/javascript>
//Begin function window_onload
function window_onload() {


UpdateData();
document.getElementById("treecontrol1").checked = false; 
document.getElementById("checkbox1").checked = false; 
// TODO: Add your event handler code here
//add onInitialUpdate() function to make changes before initial run of the reports
}
//End function window_onload
</SCRIPT>

<SCRIPT for=window type=text/javascript eventname="onload">window.onload = function() { window_onload(); }</SCRIPT>
</HEAD>
<BODY style="OVERFLOW: auto" nextelementuniquenumber="3" thumbnailscale="4" elementtype="21" edaconnectionrequired="false">
<IFRAME style="Z-INDEX: 0; POSITION: absolute; WIDTH: 450px; HEIGHT: 160px; TOP: 170px; LEFT: 90px" id=iframe1 tabIndex=2 autoExecute="False" name="iframe1"></IFRAME>
<SPAN style="Z-INDEX: 3; POSITION: absolute; WIDTH: 180px; HEIGHT: 40px; TOP: 170px; LEFT: 580px" id=checkbox1 tabIndex=4 contentEditable=false elementtype="11" columns="1" checked="false" groupChildren="1" defaultselection="0" persistentuniqueid="compUid_2" name="checkbox1">
<TABLE style="WIDTH: 100%; HEIGHT: 100%" contentEditable=false cellSpacing=0 cellPadding=0>
<TBODY>
<TR>
<TD noWrap>
<LABEL style="CURSOR: default" id=checkbox1_LABEL_0 for=checkbox1_0>
<INPUT id=checkbox1_0 tabIndex=4 value=Value1 CHECKED type=checkbox displaytext="Value1" noinput="0" name="checkbox1">Value1</LABEL></TD></TR></TBODY></TABLE></SPAN>
<SPAN style="Z-INDEX: 4; POSITION: absolute; WIDTH: 450px; HEIGHT: 160px; TOP: 170px; LEFT: 90px" id=treecontrol1 tabIndex=5 contentEditable=false elementtype="28" name="treecontrol1" checked="false" groupChildren="1" defaultselection="1" persistentuniqueid="compUid_3" numberoflayers="1">
<TABLE style="DISPLAY: block" border=0 cellSpacing=0 cellPadding=0>
<TBODY>
<TR>
<TD vAlign=top noWrap>
<INPUT id=treecontrol1_input_0 value=Value0_1 CHECKED type=checkbox displaytext="" name="treecontrol1"> 
<LABEL style="CURSOR: default" for=treecontrol1_input_0>Value0_1</LABEL> 
<TABLE style="DISPLAY: block" border=0 cellSpacing=0 cellPadding=0>
<TBODY></TBODY></TABLE>
<TABLE style="DISPLAY: block" border=0 cellSpacing=0 cellPadding=0>
<TBODY>
<TR>
<TD vAlign=top background=/ibi_html/javaassist/images/ftv2/ftv2vertline.gif>
<IMG style="WIDTH: 16px; HEIGHT: 22px" id=image3 width=16 height=22 rtFileName="htmlpathsub/javaassist/images/ftv2/ftv2pnode.gif" name="image3"></TD>
<TD vAlign=top noWrap>
<INPUT id=treecontrol1_input_1_0 value=Value1_2 type=checkbox displaytext="" name="treecontrol1"> 
<LABEL style="CURSOR: default" for=treecontrol1_input_1_0>Value1_2</LABEL></TD></TR>
<TR>
<TD vAlign=top background=/ibi_html/javaassist/images/ftv2/ftv2vertline.gif>
<IMG style="WIDTH: 16px; HEIGHT: 22px" id=image4 width=16 height=22 rtFileName="htmlpathsub/javaassist/images/ftv2/ftv2pnode.gif" name="image4"></TD>
<TD vAlign=top noWrap>
<INPUT id=treecontrol1_input_1_1 value=Value1_3 type=checkbox displaytext="" name="treecontrol1"> 
<LABEL style="CURSOR: default" for=treecontrol1_input_1_1>Value1_3</LABEL></TD></TR>
<TR>
<TD vAlign=top background=/ibi_html/javaassist/images/ftv2/ftv2vertline.gif>
<IMG style="WIDTH: 16px; HEIGHT: 22px" id=image5 width=16 height=22 rtFileName="htmlpathsub/javaassist/images/ftv2/ftv2pnode.gif" name="image5"></TD>
<TD vAlign=top noWrap>
<INPUT id=treecontrol1_input_1_2 value=Value1_10 type=checkbox displaytext="" name="treecontrol1"> 
<LABEL style="CURSOR: default" for=treecontrol1_input_1_2>Value1_10</LABEL></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></SPAN>     
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=layoutinfo type=hidden resourcectrlids="image3;image4;image5">
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=ibiapp_app value=efproneb type=hidden ismre="1" name="ibiapp_app">
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=ibif_ex value=app/orgunit_test.htm type=hidden name="ibif_ex">
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=IBIMR_domain value=efproneb/efproneb.htm type=hidden name="IBIMR_domain">
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=IBIMR_folder value=#caputilqzg8t type=hidden name="IBIMR_folder">
<xml id=focus_xmlelement>
<script type="text/xml" nextelementuniquenumber="7">
	
<rootxmlnode focoption="FOC_NONE" top="100" left="10" width="150" height="130">
		
<variables>
			
<variable controltype="7" name="PARA" parametercreatedinreslay="1" top="70" left="30" width="60" height="20" inbinding="1" select="multi">
				
<link linktype="default" persistentuniqueid="compUid_2">
					
<condition default="1" name="Default" whattodowithcontrol="4" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0">
						
<data_info checkForDuplicateValues="0" sourcetype="typeMaster" operation="OR"></data_info></condition></link>
				
<requestid id="0"></requestid>
			</variable>
			
<variable controltype="7" name="Parameter1" parametercreatedinreslay="1" top="70" left="30" width="60" height="20" inbinding="1">
				
<link linktype="default" persistentuniqueid="compUid_4" from="compUid_2">
					
<condition default="1" name="Default" whattodowithcontrol="4" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0">
						
<data_info checkForDuplicateValues="0" sourcetype="typeMaster"></data_info></condition></link></variable>
			
<variable controltype="7" name="Parameter2" parametercreatedinreslay="1" top="70" left="140" width="60" height="20" inbinding="1" select="multi">
				
<link linktype="default" persistentuniqueid="compUid_6" from="compUid_3" treelayerfrom="1">
					
<condition default="1" name="Default" whattodowithcontrol="4" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0">
						
<data_info checkForDuplicateValues="0" sourcetype="typeMaster" operation="OR"></data_info></condition></link></variable></variables>
		
<input_controls>
			
<input_control bindcontrolid="compUid_2" elementtype="11" name="checkbox1" id="checkbox1" multiple="0" onetimepopulated="1" inbinding="1" top="20" left="30" width="60" height="20">
				
<link linktype="default" persistentuniqueid="compUid_3">
					
<condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0">
						
<data_info checkForDuplicateValues="0" sourcetype="typeMaster" datasource="" displayfield="" datafield="" datatype="0" selectedvalue="" accept="0" addalloption="0" modifiedrequest="0" operation="NONE">
							
<![CDATA[]]>
							
<static_values>
								
<static value="Value1" display="Value1" selected="1" noinput="0"></static></static_values></data_info></condition></link></input_control>
			
<input_control bindcontrolid="compUid_3" elementtype="28" name="treecontrol1" id="treecontrol1" multiple="0" inbinding="1" top="20" left="140" width="60" height="20" onetimepopulated="1">
				
<link linktype="default" persistentuniqueid="compUid_5">
					
<condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0">
						
<data_info checkForDuplicateValues="0" sourcetype="typeMaster" operation="OR">
							
<static_values persistentuniqueid="10">
								
<treenode value="Value0_1" displaytext="Value0_1" persistentuniqueid="1" nodestate="2" selected="1">
									
<treenode value="Value1_2" displaytext="Value1_2" persistentuniqueid="2" nodestate="2">
										
<treenode value="Value2_4" displaytext="Value2_4" persistentuniqueid="4" nodestate="2">
											
<treenode value="Value3_5" displaytext="Value3_5" persistentuniqueid="5"></treenode>
											
<treenode value="Value3_6" displaytext="Value3_6" persistentuniqueid="6"></treenode>
											
<treenode value="Value3_7" displaytext="Value3_7" persistentuniqueid="7"></treenode></treenode></treenode>
									
<treenode value="Value1_3" displaytext="Value1_3" persistentuniqueid="3" nodestate="2">
										
<treenode value="Value2_8" displaytext="Value2_8" persistentuniqueid="8" nodestate="2">
											
<treenode value="Value3_9" displaytext="Value3_9" persistentuniqueid="9"></treenode></treenode></treenode>
									
<treenode value="Value1_10" displaytext="Value1_10" persistentuniqueid="10"></treenode></treenode></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> 

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


WF: 7.6.8
OS/Platform: Windows, Unix
January 30, 2013, 09:32 AM
BarryS
Hi Neenz

Open the HTML Code in the HTML Composer and select the treecontrol1 and checkbox1 one at a time and go to the "Properties and settings" window for each control and uncheck the selected checkbox. That should resolve the issue. If you dont see the "Properties and settings" window go to "View" menu item and make sure that "Properties and settings" is checked.

When all else fails open a tech support ticket and we will work with you.

Thanks Barry


WebFOCUS 8103, Windows, App Studio
January 30, 2013, 10:02 AM
Tom Flynn
document.getElementById("checkbox1").checked = false;
S/B
document.getElementById("checkbox1_0").checked = false;

BUT, this is not needed, actually - Remove CHECKED from this line:
 <INPUT id=checkbox1_0 tabIndex=4 value=Value1 CHECKED type=checkbox displaytext="Value1" noinput="0" name="checkbox1">Value1</LABEL></TD></TR></TBODY></TABLE></SPAN>


If you want to deselect Value0_1, then, the Tree will collapse as the SELECTED = "1" on this line expands the tree.
  
<treenode value="Value0_1" displaytext="Value0_1" persistentuniqueid="1" nodestate="2" selected="1">


Take it out, and, the user would have to select the tree...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
January 30, 2013, 10:33 AM
MattC
Neenz -- I gave you code in the other post that should work? Don't put it in function window_onload() put it in the onInitialupdate.

Barry - That doesn't quite work, I know it didnt for me in 7.7.03. You and I worked hand in hand with these tree controls.

So if you do need further help, try and get Barry.


WebFOCUS 8.1.05