function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

S-control works on Firefox but errors on IE

Hi there, am at my wit's end on this one. Have a fairly basic S-control which takes info from an opportunity and creates a new custom object called a Sales Order. Once it's done that it redirects the user to the new Sales Order. Have developed and tested this in Firefox and it works fine. However testing on IE 6 SP1 keeps throwing up an "Object required" error (that ol' chestnut...). I know you'll say just use FF, but unfortunately the client doesn't want to change all their browsers just because of this...
Was finding it virtually impossible to figure out what IE was doing until I got hold of the MS script debugger. Once I turned that on, I was able to see where the script was breaking. However I found that it was in the sforceclient.js, Line 2541... this is the snippet of code from sforceclient.js (full path
Sforce.PicklistEntry.prototype = new Sforce.SoapObject; = new Boolean();
Sforce.PicklistEntry.prototype.defaultValue = new Boolean();
Sforce.PicklistEntry.prototype.label = new String();
Sforce.PicklistEntry.prototype.validFor = new Array();
Sforce.PicklistEntry.prototype.value = new String();
/** @ignore */
Sforce.getResponseNode = function(response) {
 if (sforceClient.appType != Sforce.Application.Type.InternetExplorer) {
  var bNode = response.getElementsByTagName("Body")[0];
  for (i=0;i<bNode.childNodes.length;i++) {
   if (bNode.childNodes[i].nodeType == 1) {
    return bNode.childNodes[i];
 } else {
  return response.getElementsByTagName("soapenv:Body")[0].childNodes[0];             <---- BREAKING HERE
I have absolutely no idea why this would be happening. Only thing I can think of, is that I have some HTML text in the S-control, which displays the "Processing" dots. I'm wondering if perhaps my HTML text is not laid out correctly. I can see that this code only executes for IE, but not sure whyit would cause processing to stop.
As an aside (not sure if it's related or not) I also get a "this page contains both secure and non-secure...." warning message when running on IE but I don't on Firefox.
Anyone seen this before? Or have any clues as to what might be going on? Or is there another version of the sforceclient (not beta 3.3) that I could also try?
Thanks very much for your help.
Stephen Brown
Sofia Works Ltd
75 Cannon St,
London EC4N 5BN, U.K.
Gareth DaviesGareth Davies
Hi Stephen,
Feel free to drop me an email offline, would be interested to catch up as we are in London too.
The IE pop-up is normal - there is a way around this that Steve Bower came up with (and posted earlier):
<script type="text/javascript">

// This is to get around the secure/insecure warning that shows in IE.

 Sforce.Client.prototype.createWait = function() {

      var w = Sforce.doc.getElementById("sfdc_waiter");

      if (w != undefined) {

            return w;

      } else {

            w = Sforce.doc.createElement("iframe");

   = "visible";

            w.frameBorder = "no";

            // = "transparent";

            w.allowTransparency = true;

   = "sfdc_waiter";

   = "sfdc_waiter";

            w.src = "javascript:false;";              // Added this.  sbower.

            return w;




Which may work (I have not tried the fix yet).
--- As for your other problem, I don't see why this should not work as I've had no issues with IE and Beta3.3. What happens if you launch with "browser=false" perhaps it's that which is different.

Message Edited by Gareth Davies on 08-22-2006 07:41 AM

If you'd like, shoot me a copy of the S-control, I'd be interested in finding the problem.  My e-mail is below.

Steve Bower.
Hi guys, thanks for your comments on this.

I managed to get this working in IE by separating out the includes for the browser support. Before I had

<script language="javascript" src="" type="text/javascript"></script>

changed this to

<script language="javascript" src="" type="text/javascript"></script>
<script language="javascript" src="" type="text/javascript"></script>

and this seemed to solve the problem.
Thanks again for the comments.