Although the HTML canvas is fully integrated with JavaScript, it is suggested that you do not create custom JavaScript that manipulates the HTML canvas generated controls, as WebFOCUS cannot support such custom JavaScript code. Additionally, there is no guarantee that the JavaScript code will work correctly in future releases.
Note:
//End function window_onload
The HTML canvas run time will call onInitialUpdate() if it exists.
How to: |
IbComposer_runAnimation runs the animation defined by the user in the Tasks and Animations panel.
IbComposer_runAnimation(name);
where:
Alphanumeric
Is the name of the animation specified by the user in the Tasks and Animations panel.
function submit1_onclick(event) { IbComposer_runAnimation('animation1'); }
How to: |
IbComposer_triggerExecution allows the user to execute a specific task defined in the Tasks section of the Tasks and Animations panel.
IbComposer_triggerExecution(taskName,index);
where:
Alphanumeric
Is the name of the task specified by the user in the Tasks section of the Tasks and Animations panel in the HTML canvas.
Numeric
Is the task number starting from the number 1.
function submit1_onclick(event) { IbComposer_triggerExecution('task1',1); }
How to: |
IbComposer_getMapObject returns the map object for the map container that is passed as the parameter. This object can then be used as a parameter in other API functions.
IbComposer_getMapObject(mapId);
where:
Alphanumeric
Is the unique identifier of the map container. For example, mapcontrol1.
function onInitialUpdate() { var map = IbComposer_getMapObject('mapcontrol1'); }
How to: |
IbComposer_getMarkers returns an array of markers for a specific layer of a map.
IbComposer_getMarkers(mapId,layerName);
where:
Alphanumeric
Is the unique identifier of the map container. For example, mapcontrol1.
Alphanumeric
Is the name of the layer for which the markers are returned. For example, layer1.
function onInitialUpdate() { var map = IbComposer_getMapObject('mapcontrol1'); var markers = IbComposer_getMarkers('mapcontrol1','Customers'); }
How to: |
IbComposer_populateDynamicCtrl allows you to determine from which control data is drawn from to populate a destination control.
IbComposer_populateDynamicCtrl(controlID,fromControlId);
where:
Alphanumeric
Is the unique identifier of the control from which values are obtained. For example, listbox1.
Alphanumeric
Is the unique identifier of the control from which values are obtained, when two or more controls are chained to a destination control. For example, if listbox1 and listbox2 are both chained to listbox3, by default, the values of listbox3 will be determined by listbox1. You can use IbComposer_populateDynamicCtrl('listbox3','listbox2') to make listbox2 determine the values of listbox3. This identifier is optional.
function button3_onclick(event) { var acc = IbComposer_populateDynamicCtrl('listbox3','listbox2'); acc.selectNextPage(); }
How to: |
IbComposer_getComponentById obtains a component by using its ID.
IbComposer_getComponentById(controlID);
where:
Alphanumeric
Is the unique identifier of the control from which values are obtained. For example, listbox1.
function button3_onclick(event) { var acc = IbComposer_getComponentById('accordion1'); acc.selectNextPage(); }
How to: |
IbComposer_getCurrentSelection gets the current selected values from a control.
IbComposer_getCurrentSelection(controlID,[layer]);
where:
Alphanumeric
Is the unique identifier of the control from which values are obtained.
Integer
Is an optional parameter used to specify the layer number in a multi source Tree control if a Multi source Tree control is being used. The layer number starts with 1 for the first layer.
function button1_onclick(event) { var values = IbComposer_getCurrentSelection('combobox1'); for(var I = 0; i < values.length; i++) alert(values[i]); }
How to: |
IbComposer_getCurrentSelectionEx gets the current selected actual or display values from a control. The function can also be used to get the index values for List Boxes, Drop Down Lists, and Double Lists.
IbComposer_getCurrentSelectionEx(controlID,[layer]);
where:
Alphanumeric
Is the unique identifier of the control from which values are obtained.
Integer
Is an optional parameter used to specify the layer number in a multi source Tree control if a Multi source Tree control is being used. The layer number starts with 0 for the first layer.
function button1_onclick(event) { var values = IbComposer_getCurrentSelectionEx('combobox1'); for(var i = 0; i < values.length; i++) { alert("Index Value: " + values[i].getIndex() + "\n" + "Actual Value: " + values[i].getValue() + "\n" + "Display Value: " + values[i].getDisplayValue()); }
How to: |
IbComposer_setCurrentSelection sets the current selected values for control parameters.
IbComposer_setCurrentSelection(controlID,arrValues,bUpdateDependencies);
where:
Alphanumeric
Is the unique identifier of the control for which to set the values.
Array
Is the array of values to be set.
Boolean
Is an operator that can be set to true to update chained controls and triggered events. The default is false.
function button2_onclick(event) { var arr = []; arr.push('ITALY'); arr.push('JAPAN'); IbComposer_setCurrentSelection('listbox1',arr,false); }
How to: |
IbComposer_execute executes a report or chart.
IbComposer_execute(reportID,[outputTarget]);
where:
Alphanumeric
Is the unique identifier of the report or chart to execute.
Alphanumeric
Is the optional parameter to set the target of the output. Is one of the following:
function button3_onclick(event) { IbComposer_execute('report1','newwin'); }
How to: |
IbComposer_isSelected determines if a control or value is selected.
IbComposer_isSelected(controlID,[testValue]);
where:
Alphanumeric
Is the unique identifier of the control being tested.
Alphanumeric
Is the optional parameter the control is being checked against.
function checkbox1_onclick(event) { var curValue = IbComposer_isSelected('checkbox1'); IbComposer_showHtmlElement('form1',curValue); }
How to: |
IbComposer_showHtmlElement shows or hides an HTML element.
IbComposer_showHtmlElement(elementID,bShow);
where:
Alphanumeric
Is the unique identifier of the element which is shown or hidden.
Boolean
Is an operator that can be set to true to show the element and false to hide it.
function checkbox1_onclick(event) { var curValue = IbComposer_isSelected('checkbox1'); IbComposer_showHtmlElement('form1',curValue); }
How to: |
IbComposer_enableHtmlElement enables or disables an HTML element.
IbComposer_enableHtmlElement(elementID,bEnable);
where:
Alphanumeric
Is the unique identifier of the element which is enabled or disabled.
Boolean
Is an operator that can be set to true to enable the element and false to disable it.
function checkbox2_onclick(event) { IbComposer_enableHtmlElement('listbox1', IbComposer_isSelected('checkbox2','country')); IbComposer_enableHtmlElement('combobox1', IbComposer_isSelected('checkbox2','car')); IbComposer_enableHtmlElement('listbox2', IbComposer_isSelected('checkbox2','model')); IbComposer_enableHtmlElement('combobox2', IbComposer_isSelected('checkbox2','dcost')); }
How to: |
IbComposer_ResetDownChainControls resets the controls down the chain from the current control to have correct corresponding values.
IbComposer_ResetDownChainControls(ctrl);
where:
Alphanumeric
Is the unique identifier of the first control.
function button4_onclick(event) { var arr = [];arr.push('ENGLAND'); IbComposer_setCurrentSelection('listbox1',arr,false); IbComposer_ResetDownChainControls('listbox1'); }
How to: |
IbComposer_selectTab selects the tab specified by the tabNumberToSelect and makes it the active tab.
IbComposer_selectTab(tabControlID,tabNumberToSelect);
where:
Alphanumeric
Is the unique identifier of the tab control being made active.
Integer
Is the number of the tab to make active.
<FORM id=form1 onsubmit="OnExecute(this); IbComposer_selectTab('tab1',1) name="form1">
How to: |
IbComposer_selectTemplateTab selects a tab on a template page and makes it the active tab.
IbComposer_selectTemplateTab(tabId);
where:
Alphanumeric
Is the unique identifier of the tab control being made active.
function submit1_onclick(event) { IbComposer_selectTemplateTab('tab5'); }
How to: |
IbComposer_getAllAmpersValues is used to get the current selected values from all the controls on your page layout. It then takes those values and assembles them as a string that can be added to the end of a URL call. An example of this would be having a REGION control and multiselecting MidEast, NorthEast, and NorthWest. It will assemble these selections as shown below:
®ION=%27MidEast%27%20OR%20%27NorthEast%27%20OR%20%27NorthWest%27
This function can be used in conjunction with the Business Intelligence Portal, where the generated string is appended to all Business Intelligence Portal calls that run reports or charts. This allows the parameter values to affect all portal components, even if new ones are added or existing ones are removed at runtime.
IbComposer_getAllAmpersValues([verifySelection]);
where:
Boolean
Is an optional parameter. When true and when the Selection required property for the control is set to Yes, this returns an empty string for the parameter controls that do not have a selection made.
Note: All controls have the Selection required property. This property is set to Yes by default. If a control has no valid selection made at runtime, a red box appears around it and the following status bar message displays:
Please make required selections
function button1_onclick(event) { var val = IbComposer_getAllAmpersValues(); alert(val); OnExecute(event); }
How to: |
The onbeforeload event is an event handler that is used before a control is populated with values.
onbeforeload(ctrl,arrValuesToLoad);
where:
Is a static term and should not be changed.
Alphanumeric
Is the array of values that will be loaded into the control.
function listbox1_onbeforeload(ctrl,arrValuesToLoad) { for(var i = 0; i < arrValuesToLoad.length; i++) { alert(arrValuesToLoad[i].dispValue + " " + arrValuesToLoad[i].value + " " + arrValuesToLoad[i].selected); } }
How to: |
The onafterload event is an event handler used after a control is populated with values.
onafterload(ctrl);
where:
Is a static term and should not be changed.
function listbox1_onafterload(event) { alert(IbComposer_isSelected(ctrl.id,'ALL')); }
How to: |
IbComposer_showLayer shows or hides the specified layer.
IbComposer_showLayer(layerName,bShow);
where:
Alphanumeric
Is the name of the layer, which will be shown or hidden.
Is an operator that can be set to true to show the layer or false to hide it.
function button1_onclick(event) { var eventObject = event ? event : window.event; var ctrl = eventObject.target ? eventObject.target : eventObject.srcElement; // TODO: Add your event handler code here IbComposer_showLayer('Customers','true'); }
How to: |
IbComposer_toggleLayer toggles the visibility of the specified layer.
IbComposer_toggleLayer(mapId,layerName);
where:
Alphanumeric
Is the unique identifier of the map control. For example, mapcontrol1.
Alphanumeric
Is the unique identifier of a layer within the map. For example, Layer1.
function button1_onclick(event) { var eventObject = event ? event : window.event; var ctrl = eventObject.target ? eventObject.target : eventObject.srcElement; // TODO: Add your event handler code here IbComposer_toggleLayer('mapcontrol1','Customers'); }
How to: |
IbComposer_toggleMarker toggles the visibility of the specified marker.
IbComposer_toggleMarker(mapId,layerName,markerName);
where:
Alphanumeric
Is the unique identifier of the map control. For example, mapcontrol1.
Alphanumeric
Is the unique identifier of a layer within the map. For example, Layer1.
Alphanumeric
Is the unique identifier of a marker within the map. For example, redpin.
function button1_onclick(event) { var eventObject = event ? event : window.event; var ctrl = eventObject.target ? eventObject.target : eventObject.srcElement; // TODO: Add your event handler code here IbComposer_toggleMarker('mapcontrol1','Stores','EMart'); }
How to: |
IbComposer_refreshLayer refreshes the specified layer from the database.
IbComposer_refreshLayer(mapId,layerName);
where:
Alphanumeric
Is the unique identifier of the map control. For example, mapcontrol1.
Alphanumeric
Is the unique identifier of a layer within the map. For example, Layer1.
function button1_onclick(event) { var eventObject = event ? event : window.event; var ctrl = eventObject.target ? eventObject.target : eventObject.srcElement; // TODO: Add your event handler code here IbComposer_refreshLayer('mapcontrol1','Customers'); }
How to: |
IbComposer_panToAddress allows the user to pan to the point on a map for the specified address and zoom level.
IbComposer_panToAddress(address,mapId,zoom);
where:
Alphanumeric
Is the address you want to pan to. For example, 2 Penn Plaza New York NY 10001.
Alphanumeric
Is the unique identifier of the map control. For example, mapcontrol1.
Integer
Is how much you wish to zoom. For example, 7.
function button1_onclick(event) { var eventObject = event ? event : window.event; var ctrl = eventObject.target ? eventObject.target : eventObject.srcElement; // TODO: Add your event handler code here IbComposer_panToAddress('2 Penn Plaza,NY,NY','mapcontrol1',10); }
How to: |
ibComposer_panToPoint allows the user to pan to the point on a map for the specified coordinates and zoom level.
IbComposer_panToPoint(lat,long,mapId,zoom);
where:
Integer
Is the latitude coordinate of the point you want to pan to. For example, 40.7663277.
Integer
Is the longitude coordinate of the point you want to pan to. For example, -73.9920777.
Alphanumeric
Is the unique identifier of the map control. For example, mapcontrol1.
Integer
Is how much you wish to zoom . For example, 7.
function button1_onclick(event) { var eventObject = event ? event : window.event; var ctrl = eventObject.target ? eventObject.target : eventObject.srcElement; // TODO: Add your event handler code here IbComposer_panToPoint(37.0625,-95.677068,'mapcontrol1',5); }
How to: |
IbComposer_showAllMarkers displays all markers for the specified layer.
IbComposer_showAllMarkers(mapId,layerName);
where:
Alphanumeric
Is the unique identifier of the map control. For example, mapcontrol1.
function button1_onclick(event) { var eventObject = event ? event : window.event; var ctrl = eventObject.target ? eventObject.target : eventObject.srcElement; // TODO: Add your event handler code here IbComposer_showAllMarkers('mapcontrol1','Customers'); }
How to: |
IbComposer_drawBullseye draws a bullseye at a point on the map. This function has optional parameters to select whether to display markers, the units of measure used for the bullseye, the number of rings, the size of the rings, and the color of the rings.
IbComposer_drawBullseye(mapId,lat,long,selectmarkers,units,rings,[list-of-sizes],[list-of-colors]);
where:
Alphanumeric
Is the unique identifier of the map control. For example, mapcontrol1.
Integer
Is the latitude coordinate of the point you want to pan to. For example, 40.7663277.
Integer
Is the longitude coordinate of the point you want to pan to. For example, -73.9920777.
Boolean
Is an operator that, when set to true, selects all markers within the Bullseye.
Alphanumeric
The unit of measure for the Bullseye rings For example, mi for miles.
Integer
The number of rings the bullseye uses. For example, 3.
Integer
Is an optional parameter, as a comma (,) separated list of sizes for the bullseye rings. For example, 1, 3, 5.
Alphanumeric
Is an optional parameter, as a comma (,) separated list of colors for the bullseye rings. The colors can be RGB values or hexadecimal values. For example, Blue or #FFFF.
function button1_onclick(event) { var eventObject = event ? event : window.event; var ctrl = eventObject.target ? eventObject.target : eventObject.srcElement; // TODO: Add your event handler code here IbComposer_drawBullseye('mapcontrol1',37.0625,-95.677068,'true','mi',3); }
WebFOCUS |