I am experiencing some kind of weird Javascript behavior.
Although the expression in the expression ifevaluates to false, my code inside if blockcontinues to execute.
Here is the code snippet:
if (view.leftCols !== null) {
var leftCols = view.leftCols.split(',');
for (var lc = 0; lc < leftCols.length; lc++) {
var lcv = leftCols[lc].split(':');
var lcol = lcv[0];
Array.add(allCols, lcol);
try {
var lwidth = lcv[1] - MyWorkGrid.getColWidth(lcol);
if (lcol === 'Edit') {
if ($.browser.msie && parseInt($.browser.version) <= 8) {
lwidth = 23;
}
}
if (lwidth > 0) {
grid.SetWidth(lcol, lwidth);
}
} catch (e) {
}
grid.MoveCol(lcol, 0, 1, 1);
}
}
Here is my screenshot of Firebug:

Any ideas?
source
share