Hi,
I am trying to load the dropdown on click using the ibcomposer_setcurrentselection javascript function but it's not working.
I want to declare the dropdown as "Static" by default and when I click the button it should get populated.
How can I achieve this?
Please see the following sample code I am using.
<!-- Generated by Report Layout Painter -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<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="/ibihtml/javaassist/nls.js"></SCRIPT>
<SCRIPT id=IBI_nlsVars type=text/javascript src="/ibihtml/javaassist/nlsvars.js"></SCRIPT>
<SCRIPT id=IBI_ibigbl type=text/javascript src="/ibihtml/javaassist/ibi/html/js/ibigbl.js"></SCRIPT>
<SCRIPT id=IBI_ibigblloadCss type=text/javascript>
ibigblloadCss(null);
addIntlTranslatedJS("composertrans.js");
</SCRIPT>
<TITLE>HtmlPage</TITLE>
<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
//Begin function button1_onclick
function button1_onclick(ctrl) {
alert("button1 click");
IbComposer_setCurrentSelection("TestDrop2",COUNTRY.value,true);
alert("done");
}
//End function button1_onclick
</SCRIPT>
<SCRIPT for=window type=text/javascript eventname="onload">window.onload = function() { window_onload(); }</SCRIPT>
</HEAD>
<BODY style="OVERFLOW: auto" name="TestDrop" nextelementuniquenumber="2" thumbnailscale="4" elementtype="21" edaconnectionrequired="true">
<SELECT style="Z-INDEX: 1; POSITION: absolute; WIDTH: 120px; TOP: 30px; LEFT: 40px" id=TestDrop tabIndex=1 defaultselection="1" persistentuniqueid="compUid_1" name="TestDrop"></SELECT>
<INPUT style="Z-INDEX: 2; POSITION: absolute; WIDTH: 110px; HEIGHT: 30px; TOP: 90px; LEFT: 120px" id=button1 language=javascript tabIndex=2 onclick=button1_onclick(this) value=Click type=button name="button1">
<SELECT style="Z-INDEX: 3; POSITION: absolute; WIDTH: 130px; TOP: 30px; LEFT: 200px" id=TestDrop2 tabIndex=3 defaultselection="1" persistentuniqueid="compUid_2" name="TestDrop2"></SELECT>
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=layoutinfo type=hidden>
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=ibiapp_app value="persistdir persist_mfd" type=hidden ismre="1" name="ibiapp_app">
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=ibif_ex value=app/test_dynamic_load.htm type=hidden name="ibif_ex">
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=IBIMR_domain value=persiste/persiste.htm type=hidden name="IBIMR_domain">
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=IBIMR_folder value=#testeohjy37h type=hidden name="IBIMR_folder">
<xml id=focus_xmlelement>
<script type="text/xml" nextelementuniquenumber="3">
<rootxmlnode focoption="_FOC_NULL">
<variables></variables>
<input_controls>
<input_control bindcontrolid="compUid_1" elementtype="8" name="TestDrop" id="TestDrop" multiple="0" onetimepopulated="0">
<link linktype="default" persistentuniqueid="compUid_1">
<condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0">
<data_info checkForDuplicateValues="0" sourcetype="typeMaster" datatype="1" modifiedrequest="0" ibiapp_app="persistdir persist_mfd" datasource="SAMPLEHOLD.mas" displayfield="SAMPLEHOLD.SEG01.COUNTRY" ibiformat="A10" dfformat="A10" datafield="SAMPLEHOLD.SEG01.COUNTRY" addalloption="1" dynalldisplayvalue="ALL" cacheruntimedata="1">
<![CDATA[TABLE FILE SAMPLEHOLD
SUM FST.SAMPLEHOLD.SEG01.COUNTRY
BY SAMPLEHOLD.SEG01.COUNTRY
-*insert_filters_here
ON TABLE PCHOLD FORMAT XML
END
]]></data_info></condition></link></input_control>
<input_control bindcontrolid="compUid_2" elementtype="8" name="TestDrop2" id="TestDrop2" multiple="0" onetimepopulated="0">
<link linktype="default" persistentuniqueid="compUid_2">
<condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0">
<data_info checkForDuplicateValues="0" sourcetype="typeMaster" datatype="1" modifiedrequest="0" datasource="SAMPLEHOLD.mas" displayfield="SAMPLEHOLD.SEG01.CAR" datafield="SAMPLEHOLD.SEG01.CAR" ibiapp_app="persistdir persist_mfd" ibiformat="A16" dfformat="A16" addalloption="1" dynalldisplayvalue="ALL" cacheruntimedata="1">
<![CDATA[TABLE FILE SAMPLEHOLD
SUM FST.SAMPLEHOLD.SEG01.CAR
BY SAMPLEHOLD.SEG01.CAR
-*insert_filters_here
ON TABLE PCHOLD FORMAT XML
END
]]></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>
WFConsultant
WF 8105M on Win7/Tomcat