Handling “Maximum Call Stack Size Exceeded” in jQuery Calx

When you are building your web based calculator using jQuery Calx, it is a bit hard to track which cell refer to which cell, and sometimes circular reference occurred where some cell refer to itself, causing infinite loop of calculation operation and exceed the maximum call stack that can be handled by the javascript engine. For example: A1 is a cell with some value B1 is a cell with formula = A1+D1 C1 is a cell with formula = B1+10 D1 is a cell with formula = C1*3 In this case, when B1 is calculated, it will calculate it's dependencies [...]