I am trying to run the following script in my Visualforce Page in my Developer Org:
<apex:page controller="SidebarTestController">
<!--<apex:includeScript loadOnReady="true" value="/soap/ajax/29.0/connection.js" />
<apex:includeScript loadOnReady="true" value="/soap/ajax/29.0/apex.js" /> -->
<apex:includeScript loadOnReady="true" value="c.na30.visual.force.com/support/console/39.0/integration.js" />
<script type="text/javascript">
var callback = function (result) {
alert('Testing');
if (result.success) {
alert('Congratulations!');
}else {
alert('something is wrong!');
}
};
function setSidebarVisible() {
sforce.console.setSidebarVisible(true,sforce.console.Region.LEFT,callback);
}
</script>
<a HREF="#" onClick="setSidebarVisible();">SetSidebarToExpand</a>
It is relatively straightforward. I am trying to use the setSidebarVisible method discussed here... However, I keep getting the following console printout when loading the page:
Uncaught SyntaxError: Unexpected token <
Subsequently, I get this error:
Uncaught ReferenceError: sforce is not defined
Is this an Issue with the Salesforce Resource? (Is this a Salesforce Bug?) Or do I need to fix something?