Discussions
Odd prototype issues
I have extended JavaScript using prototype.
I have them in a common library like:
String.prototype.csTrimString = function() {...};
Date.prototype.csCompareTo = function() {...};
Object.prototype.csIsEmpty = function() {...};
Oddly, when I load a sales transaction in IE (Quirks mode) I get an error like
csIsEmpty_machine is undefined.
If I comment out the prototype csIsEmpty and reload, I get:
csCompareTo_machine is undefined
And so on for every one I comment out, the last prototype in the script file gets the *_machine undefined.
The error is generating in the NLAPI.js script and apparently taking all prototypes and appending _machine for whatever reason -- I can't tell.