ScriptLoadFailedException in Google Chrome
Posted By: nicocrm on March 21st, 2012 in General, Saleslogix
No Gravatar

When using Google Chrome in the SalesLogix web client we noticed some of the dialogs were not showing up. Instead a “ScriptLoadFailedException” was displayed in the JavaScript console:

ScriptLoadFailedException

A brief research turned out this solution… apparently the Microsoft Ajax code has a few quirks with the WebKit browser. This piece of Javascript needs to be included on the page (I added the dojo.ready call to prevent some timing issues on Internet Explorer):


dojo.ready(function () {
Sys.Browser.WebKit = {}; //Safari 3 is considered WebKit
if (navigator.userAgent.indexOf('WebKit/') > -1) {
Sys.Browser.agent = Sys.Browser.WebKit;
Sys.Browser.version = parseFloat(navigator.userAgent.match(/WebKit\/(\d+(\.\d+)?)/)[1]);
Sys.Browser.name = 'WebKit';
}
});

The easiest way to accomplish that is to add it to jscript/sage-common/general.js and redeploy the site. To be a bit cleaner for upgrades, I like to instead create a new file (SSS/js/common.js) and add its path to SageSalesLogixCommon.jsb, which will also cause it to be included in the built sage-common.js when the site is deployed:


<?xml version="1.0" encoding="utf-8"?>
<project path="" name="SageSalesLogixCommon" author="Sage Software"....>
...
<target name="Sage common" file="sage-common\sage-common.js" debug="True"... >
...
<include name="..\SSS\js\common.js" />
</target>
...
<file name="..\SSS\js\common.js" path="" />
</project>


Leave a Reply