setToolbarDimensions Method
The toolbar calls this optional method to change the current dimensions of the toolbar which are represented by barType parameter. If the wanted screen dimension isn't available, the maximum screen space that's available is allocated and an error message is sent back to toolbar.
The parameters for this method as listed in the following table. The method has no return value.
Parameter |
Description |
---|---|
barType |
Type of toolbar to which the changes apply. Possible values are: MAIN_HORIZONTAL, FLOAT_VERTICAL, or NOTIFICATION. |
height |
The toolbar height. |
width |
The toolbar width. This parameter doesn't apply to MAIN_HORIZONTAL toolbars. |
callback |
Method callback to inform the caller toolbar of the results. |
Here's sample code to call this method.
<html>
<head>
<script type="text/javascript" src="http://domain:port/ora_support/js/mcaInteractionV1.js">
</script>
<script type="text/javascript">
function setHeight(newHeight) {
svcMca.tlb.api.setToolbarDimensions("MAIN_HORIZONTAL", newHeight, 0, function (response) {
if (response.result == 'success') {
alert('Success! New height set!');
} else {
alert('Operation finished with error: ' + response.error);
}
});
}</script>
</head>
<body>
<input type="button" value="Change height" onclick="setHeight(50)"/>
</body>
</html>
The following table shows a list of member attributes of the response object. The object has no return value.
Member Attribute |
Description |
---|---|
result |
The server side running status. Result values are success or error. |
error |
Contains error message if the result value is an error. If not, then the value is undefined. For more information about error message codes, see Error Messages. |