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
The_FoxThe_Fox 

To Benji Basik Ajax Beta 2 error

Hi Benji,

I am using beta2 located on sforce and I have error in IE and Firefox in IE Appforce and Time Object not defined

and on Firefox

Error: missing ( before formal parameters
Source file: https://www.sforce.com/ajax/beta2/datehandler.js
Line: 433, Column: 17
Source code:
function Appforce.Util.LZ(x) {return(x9?"":"0")+x}

Error: time_object is not defined
Source file: https://www.sforce.com/ajax/beta2/sforceclient.js
Line: 302
If this can help

Thanks
DevAngelDevAngel
Hi The_Fox,

Right, sorry, a bit of beta3 got into beta2. Fix should go out tonight. In the mean time you can do the following.

Appforce = function() {};
Appforce.Util = function() {};
Appforce.Util.LZ = function(x) {return(x9?"":"0")+x}

This is a non-general padding function that will be replaced in beta3 by the more general functions:

String.prototype.padLeft = function(padChar, totalLength) {
var thisLen = this.length;
var out = this;
if (thisLen < totalLength) {
var diff = totalLength - thisLen;
for (var i=0;i<diff;i++) {
out = padChar + out;
}
}
return out;
};
String.prototype.padRight = function(padChar, totalLength) {
var thisLen = this.length;
var out = this;
if (thisLen < totalLength) {
var diff = totalLength - thisLen;
for (var i=0;i<diff;i++) {
out = out + padChar;
}
}
return out;
};
The_FoxThe_Fox
Hi Dave,

No problem just trying to help

Thanks for the good work

Regards