Usage
Returns true if the softphone is visible or false if the softphone is hidden.
Syntax
sforce.interaction.isVisible(callback:function)
Arguments
| Name |
Type |
Description |
callback |
function |
JavaScript method executed when the API method call is completed. |
Sample Code–JavaScript
<!-- javascript set_clipboard -->
<html>
<head>
<script type="text/javascript" src="http://domain:port/support/api/25.0/interaction.js"></script>
<script type="text/javascript">
var callback = function (response) {
if (response.result) {
alert('Softphone is visible');
} else {
alert('Softphone is not visible');
}
};
function isVisible() {
sforce.interaction.isVisible(callback);
}
</script>
</head>
<body>
<button onclick="isVisible();">isVisible</button>
</body>
</html>
Response
| Name |
Type |
Description |
result |
boolean |
true if the softphone is visible, false if the softphone isn’t visible. |
error |
string |
If the API call was successful, this variable is undefined. If the API call failed, this variable returns an error message. |