You need to sign in to do that
Don't have an account?
@GM
please suggest...
Error: CTI line 67, column 56: The element type "body" must be terminated by the matching end-tag "</body>"
Error: The element type "body" must be terminated by the matching end-tag "</body>".
<apex:page>
<html>
<head>
<!-- Imports Open CTI JavaScript library. It should point to a valid Salesforce
domain. -->
<script src="https://domain:port/support/api/25.0/interaction.js"></script>
<script type="text/javascript">
// Callback of API method: isInConsole
var isInConsoleCallback = function (response) {
// Returns true if method is executed in Salesforce console, false
otherwise.
if (response.result) {
alert('SoftPhone is in Salesforce console.');
} else {
alert('SoftPhone is not in Salesforce console.');
}
};
// Invokes API method: isInConsole
function isInConsole() {
sforce.interaction.isInConsole(isInConsoleCallback);
}
// Callback of API method: getCallCenterSettings
var getCallCenterSettingsCallback = function (response) {
// Result returns call center settings as a JSON string.
if (response.result) {
alert(response.result);
} else {
alert('Error retrieving call center settings ' +
response.error);
}
};
// Invokes API method: getCallCenterSettings
function getCallCenterSettings() {
sforce.interaction.cti.getCallCenterSettings(getCallCenterSettingsCallback);
}
// Callback of API method: setSoftphoneHeight
var setSoftphoneHeightCallback = function (response) {
// Returns true if SoftPhone height was set successfully, false
otherwise.
if (response.result) {
alert('Setting SoftPhone height to 300px was successful.');
} else {
alert('Setting softphone height failed.');
}
};
// Invokes setSoftphoneHeight API method.
function setSoftphoneHeight() {
sforce.interaction.cti.setSoftphoneHeight(300,
setSoftphoneHeightCallback);
}
// Callback of API method: getPageInfo
var getPageInfoCallback = function (response) {
if (response.result) {
alert(response.result);
} else {
alert('Error occured while trying to get page info: ' +
response.error);
}
}
// Invokes API method getPageInfo
function getPageInfo() {
sforce.interaction.getPageInfo(getPageInfoCallback);
}
</script>
</head>
<body>
<button onclick="isInConsole();">isInConsole</button></br>
<button onclick="getCallCenterSettings();">getCallCenterSettings</button></br>
<button onclick="setSoftphoneHeight();">setSoftphoneHeight(300)</button></br>
<button onclick="getPageInfo();">getPageInfo</button>
</body>
</html>
</apex:page>
Error: The element type "body" must be terminated by the matching end-tag "</body>".
<apex:page>
<html>
<head>
<!-- Imports Open CTI JavaScript library. It should point to a valid Salesforce
domain. -->
<script src="https://domain:port/support/api/25.0/interaction.js"></script>
<script type="text/javascript">
// Callback of API method: isInConsole
var isInConsoleCallback = function (response) {
// Returns true if method is executed in Salesforce console, false
otherwise.
if (response.result) {
alert('SoftPhone is in Salesforce console.');
} else {
alert('SoftPhone is not in Salesforce console.');
}
};
// Invokes API method: isInConsole
function isInConsole() {
sforce.interaction.isInConsole(isInConsoleCallback);
}
// Callback of API method: getCallCenterSettings
var getCallCenterSettingsCallback = function (response) {
// Result returns call center settings as a JSON string.
if (response.result) {
alert(response.result);
} else {
alert('Error retrieving call center settings ' +
response.error);
}
};
// Invokes API method: getCallCenterSettings
function getCallCenterSettings() {
sforce.interaction.cti.getCallCenterSettings(getCallCenterSettingsCallback);
}
// Callback of API method: setSoftphoneHeight
var setSoftphoneHeightCallback = function (response) {
// Returns true if SoftPhone height was set successfully, false
otherwise.
if (response.result) {
alert('Setting SoftPhone height to 300px was successful.');
} else {
alert('Setting softphone height failed.');
}
};
// Invokes setSoftphoneHeight API method.
function setSoftphoneHeight() {
sforce.interaction.cti.setSoftphoneHeight(300,
setSoftphoneHeightCallback);
}
// Callback of API method: getPageInfo
var getPageInfoCallback = function (response) {
if (response.result) {
alert(response.result);
} else {
alert('Error occured while trying to get page info: ' +
response.error);
}
}
// Invokes API method getPageInfo
function getPageInfo() {
sforce.interaction.getPageInfo(getPageInfoCallback);
}
</script>
</head>
<body>
<button onclick="isInConsole();">isInConsole</button></br>
<button onclick="getCallCenterSettings();">getCallCenterSettings</button></br>
<button onclick="setSoftphoneHeight();">setSoftphoneHeight(300)</button></br>
<button onclick="getPageInfo();">getPageInfo</button>
</body>
</html>
</apex:page>
<button onclick="isInConsole();">isInConsole</button><br/>
<button onclick="getCallCenterSettings();">getCallCenterSettings</button><br/>
<button onclick="setSoftphoneHeight();">setSoftphoneHeight(300)</button><br/>
All Answers
<button onclick="isInConsole();">isInConsole</button><br/>
<button onclick="getCallCenterSettings();">getCallCenterSettings</button><br/>
<button onclick="setSoftphoneHeight();">setSoftphoneHeight(300)</button><br/>
Thank you for your valuable solution.